Commit 94e63fff authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

nfs: use a static utf8 Charset for toString() in utf8string

parent 8b8f667a
......@@ -33,5 +33,9 @@ public class utf8str_mixed implements XdrAble {
value = new utf8string(xdr);
}
@Override
public String toString() {
return value.toString();
}
}
// End of utf8str_mixed.java
......@@ -6,9 +6,11 @@
package org.dcache.chimera.nfs.v4.xdr;
import org.dcache.xdr.*;
import java.io.IOException;
import java.nio.charset.Charset;
public class utf8string implements XdrAble {
private static final Charset UTF8 = Charset.forName("UTF-8");
public byte [] value;
public utf8string() {
......@@ -33,5 +35,9 @@ public class utf8string implements XdrAble {
value = xdr.xdrDecodeDynamicOpaque();
}
@Override
public String toString() {
return new String(value, UTF8);
}
}
// End of utf8string.java
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment