com.ontimize.util.remote
Class RemoteFileSaver_Impl
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.ontimize.util.remote.RemoteFileSaver_Impl
- All Implemented Interfaces:
- java.rmi.Remote, RemoteFileSaver, java.io.Serializable
- public class RemoteFileSaver_Impl
- extends java.rmi.server.UnicastRemoteObject
- implements RemoteFileSaver
- See Also:
- Serialized Form
|
Field Summary |
static boolean |
DEBUG
|
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
|
Method Summary |
void |
appendToFile(BytesBlock bytesBlock,
java.lang.String fileName)
|
void |
deleteFile(java.lang.String fileName)
Deletes the file with name fileName. |
java.lang.Object |
loadFile(java.lang.String fileName,
int offset)
Saves a file from the server in the client |
void |
saveFile(BytesBlock bytesBlock,
java.lang.String fileName)
Save the bytes of the BytesBlock in a file. |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
DEBUG
public static boolean DEBUG
RemoteFileSaver_Impl
public RemoteFileSaver_Impl(java.io.File file)
throws java.lang.Exception
RemoteFileSaver_Impl
public RemoteFileSaver_Impl(java.lang.String path)
throws java.lang.Exception
RemoteFileSaver_Impl
public RemoteFileSaver_Impl(java.net.URL urlProperties)
throws java.lang.Exception
RemoteFileSaver_Impl
public RemoteFileSaver_Impl(java.io.File file,
int port)
throws java.lang.Exception
RemoteFileSaver_Impl
public RemoteFileSaver_Impl(java.lang.String path,
int port)
throws java.lang.Exception
RemoteFileSaver_Impl
public RemoteFileSaver_Impl(java.net.URL urlProperties,
int port)
throws java.lang.Exception
saveFile
public void saveFile(BytesBlock bytesBlock,
java.lang.String fileName)
throws java.lang.Exception
- Save the bytes of the BytesBlock in a file. The fileName is the path
relative to the path used as parameter in the class constructor.
- Specified by:
saveFile in interface RemoteFileSaver
- Parameters:
bytesBlock - Object with the bytes to savefileName - Name of the file (It depends of the implementation)
- Throws:
java.lang.Exception- See Also:
{@link RemoteFileSaver_Impl}
appendToFile
public void appendToFile(BytesBlock bytesBlock,
java.lang.String fileName)
throws java.lang.Exception
- Specified by:
appendToFile in interface RemoteFileSaver
- Throws:
java.lang.Exception
deleteFile
public void deleteFile(java.lang.String fileName)
throws java.lang.Exception
- Deletes the file with name
fileName. This parameters is a
path relative to the path specified as parameter in the class constructor.
- Specified by:
deleteFile in interface RemoteFileSaver
- Parameters:
fileName - Name of the file to delete
- Throws:
java.lang.Exception
loadFile
public java.lang.Object loadFile(java.lang.String fileName,
int offset)
throws java.lang.Exception
- Saves a file from the server in the client
- Specified by:
loadFile in interface RemoteFileSaver
- Throws:
java.lang.Exception