11/*
2- * Copyright (c) 2009 - 2021 Deutsches Elektronen-Synchroton,
2+ * Copyright (c) 2009 - 2025 Deutsches Elektronen-Synchroton,
33 * Member of the Helmholtz Association, (DESY), HAMBURG, GERMANY
44 *
55 * This library is free software; you can redistribute it and/or modify
2929import java .util .Arrays ;
3030import java .util .Date ;
3131import java .util .HashMap ;
32+ import java .util .HexFormat ;
3233import java .util .List ;
3334import java .util .Map ;
3435import java .util .Optional ;
9192import com .google .common .cache .CacheBuilder ;
9293import com .google .common .cache .CacheLoader ;
9394import com .google .common .cache .LoadingCache ;
94- import com .google .common .io .BaseEncoding ;
9595import com .google .common .net .HostAndPort ;
9696
9797public class Main {
@@ -656,7 +656,7 @@ private void getRootFh(String path) throws OncRpcException, IOException {
656656
657657 _rootFh = compound4res .resarray .get (compound4res .resarray .size () - 1 ).opgetfh .resok4 .object ;
658658 _cwd = _rootFh ;
659- System .out .println ("root fh = " + BaseEncoding . base16 ().lowerCase (). encode (_rootFh .value ));
659+ System .out .println ("root fh = " + HexFormat . of ().formatHex (_rootFh .value ));
660660 }
661661
662662 public void readdir () throws OncRpcException , IOException {
@@ -787,7 +787,7 @@ nfs_fh4 cwd(String path) throws OncRpcException, IOException {
787787 COMPOUND4res compound4res = sendCompoundInSession (args );
788788
789789 _cwd = compound4res .resarray .get (compound4res .resarray .size () - 1 ).opgetfh .resok4 .object ;
790- System .out .println ("CWD fh = " + BaseEncoding . base16 ().lowerCase (). encode (_cwd .value ));
790+ System .out .println ("CWD fh = " + HexFormat . of ().formatHex (_cwd .value ));
791791 return new nfs_fh4 (_cwd .value );
792792 }
793793
@@ -942,7 +942,7 @@ private OpenReply open(String path) throws OncRpcException, IOException {
942942
943943 nfs_fh4 fh = compound4res .resarray .get (opCount - 1 ).opgetfh .resok4 .object ;
944944 stateid4 stateid = compound4res .resarray .get (opCount - 2 ).opopen .resok4 .stateid ;
945- System .out .println ("open_read fh = " + BaseEncoding . base16 ().lowerCase (). encode (fh .value ));
945+ System .out .println ("open_read fh = " + HexFormat . of ().formatHex (fh .value ));
946946
947947 return new OpenReply (fh , stateid );
948948 }
@@ -961,7 +961,7 @@ private OpenReply create(String path) throws OncRpcException, IOException {
961961 int opCount = compound4res .resarray .size ();
962962 nfs_fh4 fh = compound4res .resarray .get (opCount - 1 ).opgetfh .resok4 .object ;
963963 stateid4 stateid = compound4res .resarray .get (opCount - 2 ).opopen .resok4 .stateid ;
964- System .out .println ("open_read fh = " + BaseEncoding . base16 ().lowerCase (). encode (fh .value ));
964+ System .out .println ("open_read fh = " + HexFormat . of ().formatHex (fh .value ));
965965
966966 return new OpenReply (fh , stateid );
967967 }
@@ -990,7 +990,7 @@ private StripeMap layoutget(nfs_fh4 fh, stateid4 stateid, int layoutiomode) thro
990990 COMPOUND4res compound4res = sendCompoundInSession (args );
991991
992992 layout4 [] layout = compound4res .resarray .get (2 ).oplayoutget .logr_resok4 .logr_layout ;
993- System .out .println ("Layoutget for fh: " + BaseEncoding . base16 ().lowerCase (). encode (fh .value ));
993+ System .out .println ("Layoutget for fh: " + HexFormat . of ().formatHex (fh .value ));
994994 System .out .println (" roc : " + compound4res .resarray .get (2 ).oplayoutget .logr_resok4 .logr_return_on_close );
995995
996996 StripeMap stripeMap = new StripeMap (compound4res .resarray .get (2 ).oplayoutget .logr_resok4 .logr_stateid );
@@ -1002,7 +1002,7 @@ private StripeMap layoutget(nfs_fh4 fh, stateid4 stateid, int layoutiomode) thro
10021002 + fileDevice .nfl_deviceid .value .length );
10031003
10041004 _ioFH = fileDevice .nfl_fh_list [0 ];
1005- System .out .println (" io fh: " + BaseEncoding . base16 ().lowerCase (). encode (_ioFH .value ));
1005+ System .out .println (" io fh: " + HexFormat . of ().formatHex (_ioFH .value ));
10061006 System .out .println (" length: " + l .lo_length .value );
10071007 System .out .println (" offset: " + l .lo_offset .value );
10081008 System .out .println (" type : " + l .lo_content .loc_type );
@@ -1313,7 +1313,7 @@ private void lookup(String fh, String path) throws OncRpcException, IOException
13131313 .build ();
13141314
13151315 COMPOUND4res compound4res = sendCompoundInSession (args );
1316- System .out .println ("fh = " + BaseEncoding . base16 ().lowerCase (). encode (compound4res .resarray .get (
1316+ System .out .println ("fh = " + HexFormat . of ().formatHex (compound4res .resarray .get (
13171317 compound4res .resarray .size () - 1 ).opgetfh .resok4 .object .value ));
13181318 }
13191319
0 commit comments