Class NfsReadResponse
java.lang.Object
com.emc.ecs.nfsclient.rpc.RpcResponse
com.emc.ecs.nfsclient.nfs.NfsResponseBase
com.emc.ecs.nfsclient.nfs.NfsReadResponse
- Direct Known Subclasses:
Nfs3ReadResponse
The response, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813).
Procedure READ reads data from a file.
-
Field Summary
Fields inherited from class RpcResponse
_xid -
Constructor Summary
ConstructorsConstructorDescriptionNfsReadResponse(byte[] bytes, int position, int nfsVersion) Creates the response, as specified by RFC 1813 (https://tools.ietf.org/html/rfc1813). -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getBytes()Returns the buffer, or null if there was none.intReturns the number read.booleanisEof()Returnstrueif the end of file is reached.toString()voidunmarshalling(Xdr xdr) Load this structure from the response data, as specified by RFC 1831 (https://tools.ietf.org/html/rfc1831).Methods inherited from class NfsResponseBase
getAttributes, getFileHandle, getState, makeNfsGetAttributes, makeNfsGetAttributes, stateIsOk, unmarshallingAttributes, unmarshallingAttributes, unmarshallingFileHandle, unmarshallingFileHandleMethods inherited from class RpcResponse
getAcceptStatus, getDirection, getRejectStatus, getReplyStatus, getXid
-
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 bytesposition- the beginning position of buffer to store bytesnfsVersion- 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
Load this structure from the response data, as specified by RFC 1831 (https://tools.ietf.org/html/rfc1831).- Overrides:
unmarshallingin classNfsResponseBase- Parameters:
xdr- The xdr response data.- Throws:
RpcException
-
getBytesRead
public int getBytesRead()Returns the number read. -
isEof
public boolean isEof()Returnstrueif the end of file is reached.falseotherwise.
-
getBytes
public byte[] getBytes()Returns the buffer, or null if there was none. -
toString
Description copied from class:NfsResponseBase- Overrides:
toStringin classNfsResponseBase
-