public class NfsReadRequest extends NfsRequestBase
Procedure READ reads data from a file.
CHARSET| Constructor and Description |
|---|
NfsReadRequest(byte[] fileHandle,
long offset,
int size,
Credential credential,
int nfsVersion)
Creates the request, as specified by RFC 1813
(https://tools.ietf.org/html/rfc1813).
|
| Modifier and Type | Method and Description |
|---|---|
void |
marshalling(Xdr xdr)
Transfer data to an Xdr object for RPC use.
|
java.lang.String |
toString() |
getErrorMessage, getFileHandle, getIpKey, startToStringcloneFileHandle, isUsePrivilegedPort, setUsePrivilegedPort, trimFileNamepublic NfsReadRequest(byte[] fileHandle,
long offset,
int size,
Credential credential,
int nfsVersion)
throws java.io.FileNotFoundException
Procedure READ reads data from a file.
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. An
offset of 0 means to read data starting at the
beginning of the file. If offset is greater than
or equal to the size of the file, the status, NFS3_OK, is
returned with size set to 0 and eof
set to true, subject to access permissions
checking.size - The number of bytes of data that are to be read. If
size is 0, the READ will succeed and return 0
bytes of data, subject to access permissions checking.
size must be less than or equal to the value of
the rtmax field in the FSINFO reply structure for
the file system that contains file. If greater, the server may
return only rtmax bytes, resulting in a short
read.credential - The credential used for RPC authentication.nfsVersion - The NFS version numberjava.io.FileNotFoundExceptionpublic void marshalling(Xdr xdr)
NfsRequestmarshalling in interface NfsRequestmarshalling in class NfsRequestBasexdr - the Xdr to be sent.public java.lang.String toString()
toString in class java.lang.Object