@@ -130,7 +130,7 @@ export class Nfsv3Decoder {
130130
131131 private readFh ( ) : structs . Nfsv3Fh {
132132 const data = this . xdr . readVarlenOpaque ( ) ;
133- return new structs . Nfsv3Fh ( new Reader ( data ) ) ;
133+ return new structs . Nfsv3Fh ( data ) ;
134134 }
135135
136136 private readFilename ( ) : string {
@@ -262,13 +262,13 @@ export class Nfsv3Decoder {
262262 const xdr = this . xdr ;
263263 const mode = xdr . readUnsignedInt ( ) as Nfsv3CreateMode ;
264264 let objAttributes : structs . Nfsv3Sattr | undefined ;
265- let verf : Reader | undefined ;
265+ let verf : Uint8Array | undefined ;
266266 // tslint:disable-next-line
267267 if ( mode === Nfsv3CreateMode . UNCHECKED || mode === Nfsv3CreateMode . GUARDED ) {
268268 objAttributes = this . readSattr ( ) ;
269269 } else if ( mode === Nfsv3CreateMode . EXCLUSIVE ) {
270270 const verfData = xdr . readOpaque ( 8 ) ;
271- verf = new Reader ( verfData ) ;
271+ verf = verfData ;
272272 }
273273 return new structs . Nfsv3CreateHow ( mode , objAttributes , verf ) ;
274274 }
@@ -446,7 +446,7 @@ export class Nfsv3Decoder {
446446 const count = xdr . readUnsignedInt ( ) ;
447447 const eof = xdr . readBoolean ( ) ;
448448 const data = xdr . readVarlenOpaque ( ) ;
449- resok = new msg . Nfsv3ReadResOk ( fileAttributes , count , eof , new Reader ( data ) ) ;
449+ resok = new msg . Nfsv3ReadResOk ( fileAttributes , count , eof , data ) ;
450450 } else {
451451 resfail = new msg . Nfsv3ReadResFail ( fileAttributes ) ;
452452 }
@@ -460,7 +460,7 @@ export class Nfsv3Decoder {
460460 const count = xdr . readUnsignedInt ( ) ;
461461 const stable = xdr . readUnsignedInt ( ) ;
462462 const data = xdr . readVarlenOpaque ( ) ;
463- return new msg . Nfsv3WriteRequest ( file , offset , count , stable , new Reader ( data ) ) ;
463+ return new msg . Nfsv3WriteRequest ( file , offset , count , stable , data ) ;
464464 }
465465
466466 private decodeWriteResponse ( ) : msg . Nfsv3WriteResponse {
@@ -473,7 +473,7 @@ export class Nfsv3Decoder {
473473 const count = xdr . readUnsignedInt ( ) ;
474474 const committed = xdr . readUnsignedInt ( ) ;
475475 const verf = xdr . readOpaque ( 8 ) ;
476- resok = new msg . Nfsv3WriteResOk ( fileWcc , count , committed , new Reader ( verf ) ) ;
476+ resok = new msg . Nfsv3WriteResOk ( fileWcc , count , committed , verf ) ;
477477 } else {
478478 resfail = new msg . Nfsv3WriteResFail ( fileWcc ) ;
479479 }
@@ -651,7 +651,7 @@ export class Nfsv3Decoder {
651651 const cookie = xdr . readUnsignedHyper ( ) ;
652652 const cookieverf = xdr . readOpaque ( 8 ) ;
653653 const count = xdr . readUnsignedInt ( ) ;
654- return new msg . Nfsv3ReaddirRequest ( dir , cookie , new Reader ( cookieverf ) , count ) ;
654+ return new msg . Nfsv3ReaddirRequest ( dir , cookie , cookieverf , count ) ;
655655 }
656656
657657 private decodeReaddirResponse ( ) : msg . Nfsv3ReaddirResponse {
@@ -663,7 +663,7 @@ export class Nfsv3Decoder {
663663 if ( status === 0 ) {
664664 const cookieverf = xdr . readOpaque ( 8 ) ;
665665 const reply = this . readDirList ( ) ;
666- resok = new msg . Nfsv3ReaddirResOk ( dirAttributes , new Reader ( cookieverf ) , reply ) ;
666+ resok = new msg . Nfsv3ReaddirResOk ( dirAttributes , cookieverf , reply ) ;
667667 } else {
668668 resfail = new msg . Nfsv3ReaddirResFail ( dirAttributes ) ;
669669 }
@@ -677,7 +677,7 @@ export class Nfsv3Decoder {
677677 const cookieverf = xdr . readOpaque ( 8 ) ;
678678 const dircount = xdr . readUnsignedInt ( ) ;
679679 const maxcount = xdr . readUnsignedInt ( ) ;
680- return new msg . Nfsv3ReaddirplusRequest ( dir , cookie , new Reader ( cookieverf ) , dircount , maxcount ) ;
680+ return new msg . Nfsv3ReaddirplusRequest ( dir , cookie , cookieverf , dircount , maxcount ) ;
681681 }
682682
683683 private decodeReaddirplusResponse ( ) : msg . Nfsv3ReaddirplusResponse {
@@ -689,7 +689,7 @@ export class Nfsv3Decoder {
689689 if ( status === 0 ) {
690690 const cookieverf = xdr . readOpaque ( 8 ) ;
691691 const reply = this . readDirListPlus ( ) ;
692- resok = new msg . Nfsv3ReaddirplusResOk ( dirAttributes , new Reader ( cookieverf ) , reply ) ;
692+ resok = new msg . Nfsv3ReaddirplusResOk ( dirAttributes , cookieverf , reply ) ;
693693 } else {
694694 resfail = new msg . Nfsv3ReaddirplusResFail ( dirAttributes ) ;
695695 }
@@ -812,7 +812,7 @@ export class Nfsv3Decoder {
812812 const fileWcc = this . readWccData ( ) ;
813813 if ( status === 0 ) {
814814 const verf = xdr . readOpaque ( 8 ) ;
815- resok = new msg . Nfsv3CommitResOk ( fileWcc , new Reader ( verf ) ) ;
815+ resok = new msg . Nfsv3CommitResOk ( fileWcc , verf ) ;
816816 } else {
817817 resfail = new msg . Nfsv3CommitResFail ( fileWcc ) ;
818818 }
0 commit comments