3838import java .math .BigInteger ;
3939import java .net .URL ;
4040import java .nio .charset .Charset ;
41+ import java .nio .charset .StandardCharsets ;
4142import java .nio .file .Files ;
4243import java .util .ArrayList ;
4344import java .util .Arrays ;
@@ -2384,11 +2385,11 @@ public void testWriteByteArrayToFile_WithOffsetAndLength_WithAppendOptionTrue_Sh
23842385 final File file = TestUtils .newFile (temporaryFolder , "lines.txt" );
23852386 FileUtils .writeStringToFile (file , "This line was there before you..." );
23862387
2387- final byte [] data = "SKIP_THIS_this is brand new data_AND_SKIP_THIS" .getBytes (Charsets .UTF_8 );
2388+ final byte [] data = "SKIP_THIS_this is brand new data_AND_SKIP_THIS" .getBytes (StandardCharsets .UTF_8 );
23882389 FileUtils .writeByteArrayToFile (file , data , 10 , 22 , true );
23892390
23902391 final String expected = "This line was there before you..." + "this is brand new data" ;
2391- final String actual = FileUtils .readFileToString (file , Charsets .UTF_8 );
2392+ final String actual = FileUtils .readFileToString (file , StandardCharsets .UTF_8 );
23922393 assertEquals (expected , actual );
23932394 }
23942395
@@ -2397,11 +2398,11 @@ public void testWriteByteArrayToFile_WithOffsetAndLength_WithAppendOptionTrue_Sh
23972398 final File file = TestUtils .newFile (temporaryFolder , "lines.txt" );
23982399 FileUtils .writeStringToFile (file , "This line was there before you..." );
23992400
2400- final byte [] data = "SKIP_THIS_this is brand new data_AND_SKIP_THIS" .getBytes (Charsets .UTF_8 );
2401+ final byte [] data = "SKIP_THIS_this is brand new data_AND_SKIP_THIS" .getBytes (StandardCharsets .UTF_8 );
24012402 FileUtils .writeByteArrayToFile (file , data , 10 , 22 , false );
24022403
24032404 final String expected = "this is brand new data" ;
2404- final String actual = FileUtils .readFileToString (file , Charsets .UTF_8 );
2405+ final String actual = FileUtils .readFileToString (file , StandardCharsets .UTF_8 );
24052406 assertEquals (expected , actual );
24062407 }
24072408
0 commit comments