Class NfsReadRequest

All Implemented Interfaces:
NfsRequest
Direct Known Subclasses:
Nfs3ReadRequest

public class NfsReadRequest extends NfsRequestBase
The request, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).

Procedure READ reads data from a file.

  • 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. 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 number
      Throws:
      FileNotFoundException
  • Method Details