java.lang.Object
org.newsclub.net.unix.rmi.RemoteFileDescriptorBase<FileInputStream>
org.newsclub.net.unix.rmi.RemoteFileInput
- All Implemented Interfaces:
Closeable,Externalizable,Serializable,AutoCloseable,FileDescriptorAccess
public final class RemoteFileInput
extends RemoteFileDescriptorBase<FileInputStream>
implements Closeable
A specialized subclass of
RemoteFileDescriptorBase, specifically for
FileInputStreams.- Author:
- Christian Kohlschütter
- See Also:
-
Field Summary
Fields inherited from class org.newsclub.net.unix.rmi.RemoteFileDescriptorBase
resource -
Constructor Summary
ConstructorsConstructorDescriptionCreates an uninitialized instance; used for externalization.RemoteFileInput(AFUNIXRMISocketFactory socketFactory, FileInputStream fin) Creates a newRemoteFileInputinstance, encapsulating aFileInputStreamso that it can be shared with other processes via RMI. -
Method Summary
Modifier and TypeMethodDescriptionReturns a FileInputStream for the given instance.Methods inherited from class org.newsclub.net.unix.rmi.RemoteFileDescriptorBase
close, getFileDescriptor, getMagicValue, readExternal, writeExternal
-
Constructor Details
-
RemoteFileInput
public RemoteFileInput()Creates an uninitialized instance; used for externalization.- See Also:
-
RemoteFileInput
public RemoteFileInput(AFUNIXRMISocketFactory socketFactory, FileInputStream fin) throws IOException Creates a newRemoteFileInputinstance, encapsulating aFileInputStreamso that it can be shared with other processes via RMI.- Parameters:
socketFactory- The socket factory.fin- TheFileInputStream.- Throws:
IOException- if the operation fails.
-
-
Method Details
-
asFileInputStream
Returns a FileInputStream 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 FileInputStream.
- Throws:
IOException- if the operation fails.
-