@@ -130,7 +130,7 @@ public void test_read() throws IOException {
130130 public void test_read$B () throws IOException {
131131 final byte [] buf1 = new byte [100 ];
132132 is .read (buf1 );
133- assertTrue (new String (buf1 , 0 , buf1 .length , "UTF-8" ).equals (DATA .substring (0 , 100 )), "Failed to read correct data" );
133+ assertTrue (new String (buf1 , 0 , buf1 .length , StandardCharsets . UTF_8 ).equals (DATA .substring (0 , 100 )), "Failed to read correct data" );
134134 }
135135
136136 /**
@@ -144,7 +144,7 @@ public void test_read() throws IOException {
144144 is .skip (3000 );
145145 is .mark (1000 );
146146 is .read (buf1 , 0 , buf1 .length );
147- assertTrue (new String (buf1 , 0 , buf1 .length , "UTF-8" ).equals (DATA .substring (3000 , 3100 )), "Failed to read correct data" );
147+ assertTrue (new String (buf1 , 0 , buf1 .length , StandardCharsets . UTF_8 ).equals (DATA .substring (3000 , 3100 )), "Failed to read correct data" );
148148 }
149149
150150 /**
@@ -166,6 +166,6 @@ public void test_skipJ() throws IOException {
166166 final byte [] buf1 = new byte [10 ];
167167 is .skip (1000 );
168168 is .read (buf1 , 0 , buf1 .length );
169- assertTrue (new String (buf1 , 0 , buf1 .length , "UTF-8" ).equals (DATA .substring (1000 , 1010 )), "Failed to skip to correct position" );
169+ assertTrue (new String (buf1 , 0 , buf1 .length , StandardCharsets . UTF_8 ).equals (DATA .substring (1000 , 1010 )), "Failed to skip to correct position" );
170170 }
171171}
0 commit comments