@@ -354,11 +354,6 @@ private TestRequestBody getRequestBody(BodyType bodyType, ContentSize contentSiz
354
354
}
355
355
case BUFFERS :
356
356
case BUFFERS_REMAINING :
357
- case BUFFERS_UNSAFE :
358
- case BUFFERS_REMAINING_UNSAFE :
359
- case BYTES_UNSAFE :
360
- case BYTE_BUFFER_UNSAFE :
361
- case REMAINING_BYTE_BUFFER_UNSAFE :
362
357
case BLOCKING_INPUT_STREAM :
363
358
case BLOCKING_OUTPUT_STREAM :
364
359
case INPUTSTREAM_NO_LENGTH :
@@ -426,25 +421,6 @@ private TestAsyncBody getAsyncRequestBody(BodyType bodyType, ContentSize content
426
421
byte [] crcArray = Arrays .copyOfRange (content , offset , content .length );
427
422
return new TestAsyncBody (asyncRequestBody , content .length - offset , crc32 (crcArray ), bodyType );
428
423
}
429
- case BYTES_UNSAFE : {
430
- byte [] content = contentSize .byteContent ();
431
- AsyncRequestBody asyncRequestBody = AsyncRequestBody .fromBytesUnsafe (content );
432
- return new TestAsyncBody (asyncRequestBody , content .length , contentSize .precalculatedCrc32 (), bodyType );
433
- }
434
- case BYTE_BUFFER_UNSAFE : {
435
- byte [] content = contentSize .byteContent ();
436
- AsyncRequestBody asyncRequestBody = AsyncRequestBody .fromByteBufferUnsafe (ByteBuffer .wrap (content ));
437
- return new TestAsyncBody (asyncRequestBody , content .length , contentSize .precalculatedCrc32 (), bodyType );
438
- }
439
- case REMAINING_BYTE_BUFFER_UNSAFE : {
440
- byte [] content = contentSize .byteContent ();
441
- ByteBuffer buff = ByteBuffer .wrap (content );
442
- int offset = 2 ;
443
- buff .position (offset );
444
- AsyncRequestBody asyncRequestBody = AsyncRequestBody .fromRemainingByteBufferUnsafe (buff );
445
- byte [] crcArray = Arrays .copyOfRange (content , offset , content .length );
446
- return new TestAsyncBody (asyncRequestBody , content .length - offset , crc32 (crcArray ), bodyType );
447
- }
448
424
case BUFFERS : {
449
425
byte [] content1 = contentSize .byteContent ();
450
426
byte [] content2 = contentSize .byteContent ();
@@ -468,32 +444,6 @@ private TestAsyncBody getAsyncRequestBody(BodyType bodyType, ContentSize content
468
444
contentSize .precalculatedCrc32forBuffersAPI (),
469
445
bodyType );
470
446
}
471
- case BUFFERS_UNSAFE : {
472
- byte [] content1 = contentSize .byteContent ();
473
- byte [] content2 = contentSize .byteContent ();
474
- AsyncRequestBody asyncRequestBody = AsyncRequestBody .fromByteBuffersUnsafe (ByteBuffer .wrap (content1 ),
475
- ByteBuffer .wrap (content2 ));
476
- byte [] crcArray = new byte [content2 .length + content2 .length ];
477
- System .arraycopy (content1 , 0 , crcArray , 0 , content1 .length );
478
- System .arraycopy (content2 , 0 , crcArray , content1 .length , content2 .length );
479
- return new TestAsyncBody (asyncRequestBody ,
480
- content1 .length + content2 .length ,
481
- contentSize .precalculatedCrc32forBuffersAPI (),
482
- bodyType );
483
- }
484
- case BUFFERS_REMAINING_UNSAFE : {
485
- byte [] content1 = contentSize .byteContent ();
486
- byte [] content2 = contentSize .byteContent ();
487
- AsyncRequestBody asyncRequestBody = AsyncRequestBody .fromRemainingByteBuffersUnsafe (ByteBuffer .wrap (content1 ),
488
- ByteBuffer .wrap (content2 ));
489
- byte [] crcArray = new byte [content2 .length + content2 .length ];
490
- System .arraycopy (content1 , 0 , crcArray , 0 , content1 .length );
491
- System .arraycopy (content2 , 0 , crcArray , content1 .length , content2 .length );
492
- return new TestAsyncBody (asyncRequestBody ,
493
- content1 .length + content2 .length ,
494
- contentSize .precalculatedCrc32forBuffersAPI (),
495
- bodyType );
496
- }
497
447
case BLOCKING_INPUT_STREAM : {
498
448
byte [] content = contentSize .byteContent ();
499
449
long streamToSendLength = content .length ;
@@ -629,14 +579,8 @@ enum BodyType {
629
579
BYTE_BUFFER ,
630
580
REMAINING_BYTE_BUFFER ,
631
581
632
- BYTES_UNSAFE ,
633
- BYTE_BUFFER_UNSAFE ,
634
- REMAINING_BYTE_BUFFER_UNSAFE ,
635
-
636
582
BUFFERS ,
637
583
BUFFERS_REMAINING ,
638
- BUFFERS_UNSAFE ,
639
- BUFFERS_REMAINING_UNSAFE ,
640
584
641
585
BLOCKING_INPUT_STREAM ,
642
586
BLOCKING_OUTPUT_STREAM
0 commit comments