internal static READDIR3Response.Entry3 Deserialzie(XDR xdr) { long fileId = xdr.ReadHyper(); string name = xdr.ReadString(); long cookie = xdr.ReadHyper(); return(new READDIR3Response.Entry3(fileId, name, cookie)); }
/// <exception cref="System.IO.IOException"/> public static Org.Apache.Hadoop.Nfs.Nfs3.Request.READDIR3Request Deserialize(XDR xdr) { FileHandle handle = ReadHandle(xdr); long cookie = xdr.ReadHyper(); long cookieVerf = xdr.ReadHyper(); int count = xdr.ReadInt(); return(new Org.Apache.Hadoop.Nfs.Nfs3.Request.READDIR3Request(handle, cookie, cookieVerf , count)); }
internal static READDIRPLUS3Response.EntryPlus3 Deseralize(XDR xdr) { long fileId = xdr.ReadHyper(); string name = xdr.ReadString(); long cookie = xdr.ReadHyper(); xdr.ReadBoolean(); Nfs3FileAttributes nameAttr = Nfs3FileAttributes.Deserialize(xdr); FileHandle objFileHandle = new FileHandle(); objFileHandle.Deserialize(xdr); return(new READDIRPLUS3Response.EntryPlus3(fileId, name, cookie, nameAttr, objFileHandle )); }
public static Org.Apache.Hadoop.Nfs.Nfs3.Response.FSINFO3Response Deserialize(XDR xdr) { int status = xdr.ReadInt(); xdr.ReadBoolean(); Nfs3FileAttributes postOpObjAttr = Nfs3FileAttributes.Deserialize(xdr); int rtmax = 0; int rtpref = 0; int rtmult = 0; int wtmax = 0; int wtpref = 0; int wtmult = 0; int dtpref = 0; long maxFileSize = 0; NfsTime timeDelta = null; int properties = 0; if (status == Nfs3Status.Nfs3Ok) { rtmax = xdr.ReadInt(); rtpref = xdr.ReadInt(); rtmult = xdr.ReadInt(); wtmax = xdr.ReadInt(); wtpref = xdr.ReadInt(); wtmult = xdr.ReadInt(); dtpref = xdr.ReadInt(); maxFileSize = xdr.ReadHyper(); timeDelta = NfsTime.Deserialize(xdr); properties = xdr.ReadInt(); } return(new Org.Apache.Hadoop.Nfs.Nfs3.Response.FSINFO3Response(status, postOpObjAttr , rtmax, rtpref, rtmult, wtmax, wtpref, wtmult, dtpref, maxFileSize, timeDelta, properties)); }
public static READDIR3Response Deserialize(XDR xdr) { int status = xdr.ReadInt(); xdr.ReadBoolean(); Nfs3FileAttributes postOpDirAttr = Nfs3FileAttributes.Deserialize(xdr); long cookieVerf = 0; AList <READDIR3Response.Entry3> entries = new AList <READDIR3Response.Entry3>(); READDIR3Response.DirList3 dirList = null; if (status == Nfs3Status.Nfs3Ok) { cookieVerf = xdr.ReadHyper(); while (xdr.ReadBoolean()) { READDIR3Response.Entry3 e = READDIR3Response.Entry3.Deserialzie(xdr); entries.AddItem(e); } bool eof = xdr.ReadBoolean(); READDIR3Response.Entry3[] allEntries = new READDIR3Response.Entry3[entries.Count] ; Collections.ToArray(entries, allEntries); dirList = new READDIR3Response.DirList3(allEntries, eof); } return(new READDIR3Response(status, postOpDirAttr, cookieVerf, dirList)); }
/// <exception cref="System.IO.IOException"/> public static Org.Apache.Hadoop.Nfs.Nfs3.Request.CREATE3Request Deserialize(XDR xdr ) { FileHandle handle = ReadHandle(xdr); string name = xdr.ReadString(); int mode = xdr.ReadInt(); SetAttr3 objAttr = new SetAttr3(); long verf = 0; if ((mode == Nfs3Constant.CreateUnchecked) || (mode == Nfs3Constant.CreateGuarded )) { objAttr.Deserialize(xdr); } else { if (mode == Nfs3Constant.CreateExclusive) { verf = xdr.ReadHyper(); } else { throw new IOException("Wrong create mode:" + mode); } } return(new Org.Apache.Hadoop.Nfs.Nfs3.Request.CREATE3Request(handle, name, mode, objAttr, verf)); }
public static Org.Apache.Hadoop.Nfs.Nfs3.Response.WccAttr Deserialize(XDR xdr) { long size = xdr.ReadHyper(); NfsTime mtime = NfsTime.Deserialize(xdr); NfsTime ctime = NfsTime.Deserialize(xdr); return(new Org.Apache.Hadoop.Nfs.Nfs3.Response.WccAttr(size, mtime, ctime)); }
/// <exception cref="System.IO.IOException"/> public static Org.Apache.Hadoop.Nfs.Nfs3.Request.READ3Request Deserialize(XDR xdr ) { FileHandle handle = ReadHandle(xdr); long offset = xdr.ReadHyper(); int count = xdr.ReadInt(); return(new Org.Apache.Hadoop.Nfs.Nfs3.Request.READ3Request(handle, offset, count)); }
public static Nfs3FileAttributes Deserialize(XDR xdr) { Nfs3FileAttributes attr = new Nfs3FileAttributes(); attr.type = xdr.ReadInt(); attr.mode = xdr.ReadInt(); attr.nlink = xdr.ReadInt(); attr.uid = xdr.ReadInt(); attr.gid = xdr.ReadInt(); attr.size = xdr.ReadHyper(); attr.used = xdr.ReadHyper(); attr.rdev = new Nfs3FileAttributes.Specdata3(xdr.ReadInt(), xdr.ReadInt()); attr.fsid = xdr.ReadHyper(); attr.fileId = xdr.ReadHyper(); attr.atime = NfsTime.Deserialize(xdr); attr.mtime = NfsTime.Deserialize(xdr); attr.ctime = NfsTime.Deserialize(xdr); return(attr); }
public static Org.Apache.Hadoop.Nfs.Nfs3.Response.FSSTAT3Response Deserialize(XDR xdr) { int status = xdr.ReadInt(); xdr.ReadBoolean(); Nfs3FileAttributes postOpAttr = Nfs3FileAttributes.Deserialize(xdr); long tbytes = 0; long fbytes = 0; long abytes = 0; long tfiles = 0; long ffiles = 0; long afiles = 0; int invarsec = 0; if (status == Nfs3Status.Nfs3Ok) { tbytes = xdr.ReadHyper(); fbytes = xdr.ReadHyper(); abytes = xdr.ReadHyper(); tfiles = xdr.ReadHyper(); ffiles = xdr.ReadHyper(); afiles = xdr.ReadHyper(); invarsec = xdr.ReadInt(); } return(new Org.Apache.Hadoop.Nfs.Nfs3.Response.FSSTAT3Response(status, postOpAttr , tbytes, fbytes, abytes, tfiles, ffiles, afiles, invarsec)); }
public virtual void Deserialize(XDR xdr) { if (xdr.ReadBoolean()) { mode = xdr.ReadInt(); updateFields.AddItem(SetAttr3.SetAttrField.Mode); } if (xdr.ReadBoolean()) { uid = xdr.ReadInt(); updateFields.AddItem(SetAttr3.SetAttrField.Uid); } if (xdr.ReadBoolean()) { gid = xdr.ReadInt(); updateFields.AddItem(SetAttr3.SetAttrField.Gid); } if (xdr.ReadBoolean()) { size = xdr.ReadHyper(); updateFields.AddItem(SetAttr3.SetAttrField.Size); } int timeSetHow = xdr.ReadInt(); if (timeSetHow == TimeSetToClientTime) { atime = NfsTime.Deserialize(xdr); updateFields.AddItem(SetAttr3.SetAttrField.Atime); } else { if (timeSetHow == TimeSetToServerTime) { atime = new NfsTime(Runtime.CurrentTimeMillis()); updateFields.AddItem(SetAttr3.SetAttrField.Atime); } } timeSetHow = xdr.ReadInt(); if (timeSetHow == TimeSetToClientTime) { mtime = NfsTime.Deserialize(xdr); updateFields.AddItem(SetAttr3.SetAttrField.Mtime); } else { if (timeSetHow == TimeSetToServerTime) { mtime = new NfsTime(Runtime.CurrentTimeMillis()); updateFields.AddItem(SetAttr3.SetAttrField.Mtime); } } }
/// <exception cref="System.IO.IOException"/> public static Org.Apache.Hadoop.Nfs.Nfs3.Request.WRITE3Request Deserialize(XDR xdr ) { FileHandle handle = ReadHandle(xdr); long offset = xdr.ReadHyper(); int count = xdr.ReadInt(); Nfs3Constant.WriteStableHow stableHow = Nfs3Constant.WriteStableHow.FromValue(xdr .ReadInt()); ByteBuffer data = ByteBuffer.Wrap(xdr.ReadFixedOpaque(xdr.ReadInt())); return(new Org.Apache.Hadoop.Nfs.Nfs3.Request.WRITE3Request(handle, offset, count , stableHow, data)); }
public static Org.Apache.Hadoop.Nfs.Nfs3.Response.COMMIT3Response Deserialize(XDR xdr) { int status = xdr.ReadInt(); long verf = 0; WccData fileWcc = WccData.Deserialize(xdr); if (status == Nfs3Status.Nfs3Ok) { verf = xdr.ReadHyper(); } return(new Org.Apache.Hadoop.Nfs.Nfs3.Response.COMMIT3Response(status, fileWcc, verf )); }
public static Org.Apache.Hadoop.Nfs.Nfs3.Response.WRITE3Response Deserialize(XDR xdr) { int status = xdr.ReadInt(); WccData fileWcc = WccData.Deserialize(xdr); int count = 0; Nfs3Constant.WriteStableHow stableHow = null; long verifier = 0; if (status == Nfs3Status.Nfs3Ok) { count = xdr.ReadInt(); int how = xdr.ReadInt(); stableHow = Nfs3Constant.WriteStableHow.Values()[how]; verifier = xdr.ReadHyper(); } return(new Org.Apache.Hadoop.Nfs.Nfs3.Response.WRITE3Response(status, fileWcc, count , stableHow, verifier)); }