METHOD_0 ( ) { org . kaazing . IDENT_0 . IDENT_1 helper = org . kaazing . IDENT_0 . IDENT_1 . newInstance ( ) ; java . net . URI location = java . net . URI . create ( STRING_0 ) ; org . kaazing . IDENT_0 . ws . IDENT_2 connection = ( ( org . kaazing . IDENT_0 . ws . IDENT_2 ) ( helper . METHOD_1 ( location ) ) ) ; org . kaazing . IDENT_0 . ws . IDENT_3 IDENT_4 = connection . METHOD_2 ( ) ; org . kaazing . IDENT_0 . ws . IDENT_5 IDENT_6 = connection . METHOD_3 ( ) ; org . kaazing . IDENT_0 . ws . IDENT_7 type = null ; char [ ] IDENT_8 = new char [ INT_0 ] ; int IDENT_9 = 0 ; int count = 0 ; if ( ( type = IDENT_4 . next ( ) ) != ( org . kaazing . IDENT_0 . ws . IDENT_7 . IDENT_10 ) ) { assert IDENT_4 . streaming ( ) ; switch ( type ) { case org . kaazing . IDENT_0 . ws . IDENT_7 . IDENT_11 : java . io . IDENT_12 reader = IDENT_4 . METHOD_4 ( ) ; int offset = 0 ; while ( ( count != ( - 1 ) ) && ( offset < ( IDENT_8 . length ) ) ) { count = reader . read ( IDENT_8 , offset , ( ( IDENT_8 . length ) - offset ) ) ; if ( count != ( - 1 ) ) { IDENT_9 += count ; offset += count ; } } break ; default : "<AssertPlaceHolder>" ; break ; } } char [ ] text = new char [ IDENT_9 ] ; java . lang . System . METHOD_5 ( IDENT_8 , 0 , text , 0 , IDENT_9 ) ; IDENT_6 . METHOD_6 ( text ) ; IDENT_13 . METHOD_7 ( ) ; } read ( char [ ] , int , int ) { if ( ( ( offset < 0 ) || ( ( offset + length ) > ( IDENT_14 . length ) ) ) || ( length < 0 ) ) { int len = offset + length ; throw new java . lang . METHOD_8 ( java . lang . String . format ( org . kaazing . IDENT_0 . ws . internal . io . IDENT_15 . IDENT_16 , offset , len , IDENT_14 . length ) ) ; } if ( IDENT_17 . METHOD_9 ( ) ) { try { if ( ( IDENT_18 ) < ( IDENT_19 ) ) { return METHOD_10 ( IDENT_14 , offset , length ) ; } if ( ( IDENT_18 ) == ( IDENT_19 ) ) { IDENT_18 = 0 ; IDENT_19 = 0 ; } if ( ( IDENT_20 ) > ( IDENT_21 ) ) { int IDENT_22 = ( IDENT_20 ) - ( IDENT_21 ) ; java . lang . System . METHOD_5 ( IDENT_23 , IDENT_21 , IDENT_23 , 0 , IDENT_22 ) ; IDENT_21 = 0 ; IDENT_20 = IDENT_22 ; } while ( true ) { if ( ( IDENT_21 ) == ( IDENT_20 ) ) { IDENT_21 = 0 ; IDENT_20 = 0 ; int IDENT_24 = ( IDENT_23 . length ) - ( IDENT_20 ) ; int IDENT_25 = 0 ; try { IDENT_25 = in . read ( IDENT_23 , IDENT_20 , IDENT_24 ) ; if ( IDENT_25 == ( - 1 ) ) { return - 1 ; } } catch ( java . net . IDENT_26 ex ) { return - 1 ; } IDENT_21 = 0 ; IDENT_20 = IDENT_25 ; } int IDENT_27 = METHOD_11 ( ) ; if ( IDENT_27 == ( - 1 ) ) { return - 1 ; } IDENT_28 . METHOD_12 ( IDENT_29 , IDENT_21 ) ; int IDENT_30 = IDENT_28 . METHOD_13 ( ) ; if ( ( ( IDENT_28 . offset ( ) ) + METHOD_13 ) > ( IDENT_20 ) ) { if ( METHOD_13 > ( IDENT_23 . length ) ) { int IDENT_31 = connection . METHOD_14 ( ) ; throw new java . io . IOException ( java . lang . String . format ( org . kaazing . IDENT_0 . ws . internal . io . IDENT_15 . IDENT_32 , METHOD_13 , IDENT_31 ) ) ; } else { if ( ( ( IDENT_28 . offset ( ) ) + METHOD_13 ) > ( IDENT_23 . length ) ) { int len = ( IDENT_20 ) - ( IDENT_21 ) ; java . lang . System . METHOD_5 ( IDENT_23 , IDENT_21 , IDENT_23 , 0 , len ) ; IDENT_21 = 0 ; IDENT_20 = len ; } } int IDENT_33 = connection . METHOD_15 ( false , METHOD_13 ) ; int IDENT_34 = ( ( IDENT_21 ) + IDENT_33 ) - ( IDENT_20 ) ; while ( IDENT_34 > 0 ) { int IDENT_25 = in . read ( IDENT_23 , IDENT_20 , IDENT_34 ) ; if ( IDENT_25 == ( - 1 ) ) { return - 1 ; } IDENT_34 OP_0 IDENT_25 ; IDENT_20 += IDENT_25 ; } IDENT_28 . METHOD_12 ( IDENT_29 , IDENT_21 ) ; } METHOD_16 ( ) ; org . kaazing . IDENT_0 . ws . internal . IDENT_35 context = connection . METHOD_17 ( ) ; org . kaazing . IDENT_0 . ws . internal . io . IDENT_36 IDENT_37 = ( ( org . kaazing . IDENT_0 . ws . internal . io . IDENT_36 ) ( context . METHOD_18 ( ) ) ) ; IDENT_37 . METHOD_19 ( IDENT_38 , IDENT_28 . METHOD_20 ( ) ) ; connection . METHOD_21 ( IDENT_39 . METHOD_12 ( IDENT_40 , IDENT_21 ) ) ; IDENT_21 += IDENT_28 . length ( ) ; if ( ! ( METHOD_22 ( ) ) ) { break ; } } assert ( IDENT_18 ) < ( IDENT_19 ) ; return METHOD_10 ( IDENT_14 , offset , length ) ; } finally { IDENT_17 . METHOD_23 ( ) ; } } return 0 ; }
org . junit . Assert . assertSame ( org . kaazing . IDENT_0 . ws . IDENT_7 . IDENT_11 , type )