Class NfsReadRequest
java.lang.Object
com.emc.ecs.nfsclient.rpc.RpcRequest
com.emc.ecs.nfsclient.nfs.NfsRequestBase
com.emc.ecs.nfsclient.nfs.NfsReadRequest
- All Implemented Interfaces:
NfsRequest
- Direct Known Subclasses:
Nfs3ReadRequest
The request, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).
Procedure READ reads data from a file.
-
Field Summary
Fields inherited from class RpcRequest
CHARSET -
Constructor Summary
ConstructorsConstructorDescriptionNfsReadRequest(byte[] fileHandle, long offset, int size, Credential credential, int nfsVersion) Creates the request, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). -
Method Summary
Modifier and TypeMethodDescriptionvoidmarshalling(Xdr xdr) Writes the RPC call header and authentication credentials to the XDR buffer.toString()Methods inherited from class NfsRequestBase
getErrorMessage, getFileHandle, getIpKey, startToStringMethods inherited from class RpcRequest
cloneFileHandle, isUsePrivilegedPort, setUsePrivilegedPort, trimFileName
-
Constructor Details
-
NfsReadRequest
public NfsReadRequest(byte[] fileHandle, long offset, int size, Credential credential, int nfsVersion) throws FileNotFoundException Creates the request, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).Procedure READ reads data from a file.
- Parameters:
fileHandle- The file handle of the file from which data is to be read. This must identify a file system object of type, NF3REG.offset- The position within the file at which the read is to begin. Anoffsetof 0 means to read data starting at the beginning of the file. Ifoffsetis greater than or equal to the size of the file, the status, NFS3_OK, is returned withsizeset to 0 andeofset totrue, subject to access permissions checking.size- The number of bytes of data that are to be read. Ifsizeis 0, the READ will succeed and return 0 bytes of data, subject to access permissions checking.sizemust be less than or equal to the value of thertmaxfield in the FSINFO reply structure for the file system that contains file. If greater, the server may return onlyrtmaxbytes, resulting in a short read.credential- The credential used for RPC authentication.nfsVersion- The NFS version number- Throws:
FileNotFoundException
-
-
Method Details
-
marshalling
Writes the RPC call header and authentication credentials to the XDR buffer.- Specified by:
marshallingin interfaceNfsRequest- Overrides:
marshallingin classNfsRequestBase- Parameters:
xdr- the Xdr to be sent.
-
toString
-