METHOD_0 ( ) { final java . lang . String s = STRING_0 ; final org . apache . hc . core5 . http . io . IDENT_0 IDENT_1 = new org . apache . hc . core5 . http . impl . io . METHOD_1 ( 16 ) ; final java . io . ByteArrayInputStream IDENT_2 = new java . io . ByteArrayInputStream ( s . getBytes ( IDENT_3 . IDENT_4 ) ) ; final org . apache . hc . core5 . http . impl . io . IDENT_5 IDENT_6 = new org . apache . hc . core5 . http . impl . io . METHOD_2 ( IDENT_1 , IDENT_2 ) ; final byte [ ] buffer = new byte [ INT_0 ] ; "<AssertPlaceHolder>" ; IDENT_6 . close ( ) ; final org . apache . hc . core5 . http . io . IDENT_0 IDENT_7 = new org . apache . hc . core5 . http . impl . io . METHOD_1 ( 16 , 10 ) ; final java . io . ByteArrayInputStream IDENT_8 = new java . io . ByteArrayInputStream ( s . getBytes ( IDENT_3 . IDENT_4 ) ) ; final org . apache . hc . core5 . http . impl . io . METHOD_2 IDENT_9 = new org . apache . hc . core5 . http . impl . io . METHOD_2 ( IDENT_7 , IDENT_8 ) ; try { IDENT_9 . read ( buffer ) ; org . junit . Assert . fail ( STRING_1 ) ; } catch ( final org . apache . hc . core5 . http . IDENT_10 ex ) { } finally { try { IDENT_9 . close ( ) ; } catch ( final org . apache . hc . core5 . http . IDENT_10 ex ) { } } } read ( java . nio . IDENT_11 . IDENT_12 ) { for ( ; ; ) { switch ( state ) { case IDENT_13 : if ( ( buffer . METHOD_3 ( ) ) >= ( org . apache . hc . core5 . IDENT_14 . IDENT_15 . IDENT_16 . IDENT_17 ) ) { final int IDENT_18 = buffer . METHOD_4 ( ) ; IDENT_19 = IDENT_18 > > 8 ; if ( ( IDENT_19 ) > ( IDENT_20 ) ) { throw new org . apache . hc . core5 . IDENT_14 . METHOD_5 ( org . apache . hc . core5 . IDENT_14 . IDENT_21 . IDENT_22 , STRING_2 ) ; } type = IDENT_18 & 255 ; IDENT_23 = buffer . get ( ) ; IDENT_24 = java . lang . Math . METHOD_6 ( buffer . METHOD_4 ( ) ) ; state = org . apache . hc . core5 . IDENT_14 . impl . nio . IDENT_25 . IDENT_26 . IDENT_27 ; } else { break ; } case IDENT_27 : if ( ( buffer . METHOD_3 ( ) ) >= ( IDENT_19 ) ) { if ( ( ( IDENT_23 ) & ( IDENT_28 . IDENT_29 . getValue ( ) ) ) > 0 ) { if ( ( IDENT_19 ) == 0 ) { throw new org . apache . hc . core5 . IDENT_14 . METHOD_5 ( org . apache . hc . core5 . IDENT_14 . IDENT_21 . IDENT_30 , STRING_3 ) ; } buffer . METHOD_7 ( ) ; final int IDENT_31 = buffer . get ( ) ; if ( ( IDENT_19 ) < ( IDENT_31 + 1 ) ) { throw new org . apache . hc . core5 . IDENT_14 . METHOD_5 ( org . apache . hc . core5 . IDENT_14 . IDENT_21 . IDENT_30 , STRING_3 ) ; } buffer . METHOD_8 ( ) ; } final java . nio . ByteBuffer payload = ( ( IDENT_19 ) > 0 ) ? java . nio . ByteBuffer . METHOD_9 ( bytes , buffer . position ( ) , IDENT_19 ) : null ; buffer . position ( ( ( buffer . position ( ) ) + ( IDENT_19 ) ) ) ; state = org . apache . hc . core5 . IDENT_14 . impl . nio . IDENT_25 . IDENT_26 . IDENT_13 ; metrics . METHOD_10 ( ) ; return new org . apache . hc . core5 . IDENT_14 . IDENT_15 . METHOD_11 ( type , IDENT_23 , IDENT_24 , payload ) ; } } if ( buffer . METHOD_12 ( ) ) { buffer . METHOD_13 ( ) ; } else { buffer . METHOD_14 ( ) ; } final int IDENT_32 = channel . read ( buffer ) ; buffer . METHOD_15 ( ) ; if ( IDENT_32 > 0 ) { metrics . METHOD_16 ( IDENT_32 ) ; } if ( IDENT_32 == 0 ) { break ; } else if ( IDENT_32 < 0 ) { if ( ( ( state ) != ( org . apache . hc . core5 . IDENT_14 . impl . nio . IDENT_25 . IDENT_26 . IDENT_13 ) ) || ( buffer . METHOD_12 ( ) ) ) { throw new org . apache . hc . core5 . IDENT_14 . METHOD_17 ( STRING_4 ) ; } else { throw new org . apache . hc . core5 . http . METHOD_18 ( ) ; } } } return null ; }
org . junit . Assert . assertEquals ( 5 , IDENT_6 . read ( buffer ) )