java.lang.Object
org.newsclub.net.unix.rmi.RemoteFileDescriptorBase<FileOutputStream>
org.newsclub.net.unix.rmi.RemoteFileOutput
- All Implemented Interfaces:
Closeable
,Externalizable
,Serializable
,AutoCloseable
,FileDescriptorAccess
A specialized subclass of
RemoteFileDescriptorBase
, specifically for
FileOutputStream
s.- Author:
- Christian Kohlschütter
- See Also:
-
Field Summary
Fields inherited from class org.newsclub.net.unix.rmi.RemoteFileDescriptorBase
resource
-
Constructor Summary
ConstructorDescriptionCreates an uninitialized instance; used for externalization.RemoteFileOutput
(AFUNIXRMISocketFactory socketFactory, FileOutputStream fout) Creates a newRemoteFileOutput
instance, encapsulating aFileOutputStream
so that it can be shared with other processes via RMI. -
Method Summary
Modifier and TypeMethodDescriptionReturns a FileOutputStream for the given instance.Methods inherited from class org.newsclub.net.unix.rmi.RemoteFileDescriptorBase
close, getFileDescriptor, getMagicValue, readExternal, writeExternal
-
Constructor Details
-
RemoteFileOutput
public RemoteFileOutput()Creates an uninitialized instance; used for externalization.- See Also:
-
RemoteFileOutput
public RemoteFileOutput(AFUNIXRMISocketFactory socketFactory, FileOutputStream fout) throws IOException Creates a newRemoteFileOutput
instance, encapsulating aFileOutputStream
so that it can be shared with other processes via RMI.- Parameters:
socketFactory
- The socket factory.fout
- TheFileOutputStream
.- Throws:
IOException
- if the operation fails.
-
-
Method Details
-
asFileOutputStream
Returns a FileOutputStream for the given instance. This either is the actual instance provided by the constructor or a new instance created from the file descriptor.- Returns:
- The FileOutputStream.
- Throws:
IOException
- if the operation fails.
-