File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/main/java/com/basho/riak/client/core/util Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 41
41
*/
42
42
public final class BinaryValue
43
43
{
44
+ /**
45
+ * It is expected that UTF-8 charset is available.
46
+ */
47
+ private static final Charset theUTF8 = Charset .forName ("UTF-8" );
48
+
44
49
private final byte [] data ;
45
50
46
51
private BinaryValue (byte [] data )
@@ -87,7 +92,7 @@ public static BinaryValue create(String data)
87
92
*/
88
93
public static BinaryValue createFromUtf8 (String data )
89
94
{
90
- return create (data , Charset . forName ( "UTF-8" ) );
95
+ return create (data , theUTF8 );
91
96
}
92
97
93
98
/**
@@ -197,7 +202,7 @@ public String toString()
197
202
*/
198
203
public String toStringUtf8 ()
199
204
{
200
- return toString (Charset . forName ( "UTF-8" ) );
205
+ return toString (theUTF8 );
201
206
}
202
207
203
208
/**
You can’t perform that action at this time.
0 commit comments