use of org.apache.hadoop.nfs.nfs3.FileHandle in project hadoop by apache.
the class WRITE3Request method deserialize.
public static WRITE3Request deserialize(XDR xdr) throws IOException {
FileHandle handle = readHandle(xdr);
long offset = xdr.readHyper();
int count = xdr.readInt();
WriteStableHow stableHow = WriteStableHow.fromValue(xdr.readInt());
ByteBuffer data = ByteBuffer.wrap(xdr.readFixedOpaque(xdr.readInt()));
return new WRITE3Request(handle, offset, count, stableHow, data);
}
use of org.apache.hadoop.nfs.nfs3.FileHandle in project hadoop by apache.
the class CREATE3Request method deserialize.
public static CREATE3Request deserialize(XDR xdr) throws IOException {
FileHandle handle = readHandle(xdr);
String name = xdr.readString();
int mode = xdr.readInt();
SetAttr3 objAttr = new SetAttr3();
long verf = 0;
if ((mode == Nfs3Constant.CREATE_UNCHECKED) || (mode == Nfs3Constant.CREATE_GUARDED)) {
objAttr.deserialize(xdr);
} else if (mode == Nfs3Constant.CREATE_EXCLUSIVE) {
verf = xdr.readHyper();
} else {
throw new IOException("Wrong create mode:" + mode);
}
return new CREATE3Request(handle, name, mode, objAttr, verf);
}
use of org.apache.hadoop.nfs.nfs3.FileHandle in project hadoop by apache.
the class LINK3Request method deserialize.
public static LINK3Request deserialize(XDR xdr) throws IOException {
FileHandle handle = readHandle(xdr);
FileHandle fromDirHandle = readHandle(xdr);
String fromName = xdr.readString();
return new LINK3Request(handle, fromDirHandle, fromName);
}
use of org.apache.hadoop.nfs.nfs3.FileHandle in project hadoop by apache.
the class LOOKUP3Request method deserialize.
public static LOOKUP3Request deserialize(XDR xdr) throws IOException {
FileHandle handle = readHandle(xdr);
String name = xdr.readString();
return new LOOKUP3Request(handle, name);
}
use of org.apache.hadoop.nfs.nfs3.FileHandle in project hadoop by apache.
the class MKDIR3Request method deserialize.
public static MKDIR3Request deserialize(XDR xdr) throws IOException {
FileHandle handle = readHandle(xdr);
String name = xdr.readString();
SetAttr3 objAttr = new SetAttr3();
objAttr.deserialize(xdr);
return new MKDIR3Request(handle, name, objAttr);
}
Aggregations