Class NfsReadResponse

Direct Known Subclasses:
Nfs3ReadResponse

public class NfsReadResponse extends NfsResponseBase
The response, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).

Procedure READ reads data from a file.

  • Constructor Details

    • NfsReadResponse

      public NfsReadResponse(byte[] bytes, int position, int nfsVersion)
      Creates the response, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).

      Procedure READ reads data from a file.

      Parameters:
      bytes - the buffer for storing bytes
      position - the beginning position of buffer to store bytes
      nfsVersion - The NFS version number. This is ignored for now, as only NFSv3 is supported, but is included to allow future support for other versions.
  • Method Details

    • unmarshalling

      public void unmarshalling(Xdr xdr) throws RpcException
      Load this structure from the response data, as specified by RFC 1831 (https://tools.ietf.org/html/rfc1831).
      Overrides:
      unmarshalling in class NfsResponseBase
      Parameters:
      xdr - The xdr response data.
      Throws:
      RpcException
    • getBytesRead

      public int getBytesRead()
      Returns the number read.
    • isEof

      public boolean isEof()
      Returns
      • true if the end of file is reached.
      • false otherwise.
      .
    • getBytes

      public byte[] getBytes()
      Returns the buffer, or null if there was none.
    • toString

      public String toString()
      Description copied from class: NfsResponseBase
      Overrides:
      toString in class NfsResponseBase