@@ -236,21 +236,35 @@ static long prepend(long indexCoder, byte[] buf, boolean value, String prefix) {
236236 if (indexCoder < UTF16 ) {
237237 if (value ) {
238238 index -= 4 ;
239- StringLatin1 .putCharsAt (buf , index , 't' , 'r' , 'u' , 'e' );
239+ buf [index ] = 't' ;
240+ buf [index + 1 ] = 'r' ;
241+ buf [index + 2 ] = 'u' ;
242+ buf [index + 3 ] = 'e' ;
240243 } else {
241244 index -= 5 ;
242- StringLatin1 .putCharsAt (buf , index , 'f' , 'a' , 'l' , 's' , 'e' );
245+ buf [index ] = 'f' ;
246+ buf [index + 1 ] = 'a' ;
247+ buf [index + 2 ] = 'l' ;
248+ buf [index + 3 ] = 's' ;
249+ buf [index + 4 ] = 'e' ;
243250 }
244251 index -= prefix .length ();
245252 prefix .getBytes (buf , index , String .LATIN1 );
246253 return index ;
247254 } else {
248255 if (value ) {
249256 index -= 4 ;
250- StringUTF16 .putCharsAt (buf , index , 't' , 'r' , 'u' , 'e' );
257+ StringUTF16 .putChar (buf , index , 't' );
258+ StringUTF16 .putChar (buf , index + 1 , 'r' );
259+ StringUTF16 .putChar (buf , index + 2 , 'u' );
260+ StringUTF16 .putChar (buf , index + 3 , 'e' );
251261 } else {
252262 index -= 5 ;
253- StringUTF16 .putCharsAt (buf , index , 'f' , 'a' , 'l' , 's' , 'e' );
263+ StringUTF16 .putChar (buf , index , 'f' );
264+ StringUTF16 .putChar (buf , index + 1 , 'a' );
265+ StringUTF16 .putChar (buf , index + 2 , 'l' );
266+ StringUTF16 .putChar (buf , index + 3 , 's' );
267+ StringUTF16 .putChar (buf , index + 4 , 'e' );
254268 }
255269 index -= prefix .length ();
256270 prefix .getBytes (buf , index , String .UTF16 );
@@ -624,20 +638,34 @@ static int prepend(int index, byte coder, byte[] buf, boolean value, String pref
624638 if (coder == String .LATIN1 ) {
625639 if (value ) {
626640 index -= 4 ;
627- StringLatin1 .putCharsAt (buf , index , 't' , 'r' , 'u' , 'e' );
641+ buf [index ] = 't' ;
642+ buf [index + 1 ] = 'r' ;
643+ buf [index + 2 ] = 'u' ;
644+ buf [index + 3 ] = 'e' ;
628645 } else {
629646 index -= 5 ;
630- StringLatin1 .putCharsAt (buf , index , 'f' , 'a' , 'l' , 's' , 'e' );
647+ buf [index ] = 'f' ;
648+ buf [index + 1 ] = 'a' ;
649+ buf [index + 2 ] = 'l' ;
650+ buf [index + 3 ] = 's' ;
651+ buf [index + 4 ] = 'e' ;
631652 }
632653 index -= prefix .length ();
633654 prefix .getBytes (buf , index , String .LATIN1 );
634655 } else {
635656 if (value ) {
636657 index -= 4 ;
637- StringUTF16 .putCharsAt (buf , index , 't' , 'r' , 'u' , 'e' );
658+ StringUTF16 .putChar (buf , index , 't' );
659+ StringUTF16 .putChar (buf , index + 1 , 'r' );
660+ StringUTF16 .putChar (buf , index + 2 , 'u' );
661+ StringUTF16 .putChar (buf , index + 3 , 'e' );
638662 } else {
639663 index -= 5 ;
640- StringUTF16 .putCharsAt (buf , index , 'f' , 'a' , 'l' , 's' , 'e' );
664+ StringUTF16 .putChar (buf , index , 'f' );
665+ StringUTF16 .putChar (buf , index + 1 , 'a' );
666+ StringUTF16 .putChar (buf , index + 2 , 'l' );
667+ StringUTF16 .putChar (buf , index + 3 , 's' );
668+ StringUTF16 .putChar (buf , index + 4 , 'e' );
641669 }
642670 index -= prefix .length ();
643671 prefix .getBytes (buf , index , String .UTF16 );
0 commit comments