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 ) ; java . net . URL IDENT_2 = helper . METHOD_1 ( location ) ; org . kaazing . IDENT_0 . ws . IDENT_3 conn = ( ( org . kaazing . IDENT_0 . ws . IDENT_3 ) ( IDENT_2 . METHOD_2 ( ) ) ) ; conn . METHOD_3 ( STRING_1 , STRING_2 ) ; conn . connect ( ) ; java . io . IDENT_4 writer = conn . METHOD_4 ( ) ; java . io . IDENT_5 reader = conn . METHOD_5 ( ) ; java . lang . String IDENT_6 = new org . kaazing . IDENT_0 . ws . ext . IDENT_7 . METHOD_6 ( INT_0 ) . METHOD_7 ( ) ; java . lang . String IDENT_8 = STRING_3 + IDENT_6 ; writer . write ( IDENT_8 . METHOD_8 ( ) ) ; char [ ] IDENT_9 = new char [ INT_1 ] ; int offset = 0 ; int length = IDENT_9 . length ; int IDENT_10 = 0 ; while ( ( IDENT_10 != ( - 1 ) ) && ( length > 0 ) ) { IDENT_10 = reader . read ( IDENT_9 , offset , length ) ; if ( IDENT_10 != ( - 1 ) ) { offset += IDENT_10 ; length OP_0 IDENT_10 ; } } java . lang . String IDENT_11 = STRING_4 + IDENT_6 ; java . lang . String IDENT_12 = java . lang . String . valueOf ( IDENT_9 , 0 , offset ) ; "<AssertPlaceHolder>" ; IDENT_13 . METHOD_9 ( ) ; } read ( char [ ] , int , int ) { if ( ( ( offset < 0 ) || ( ( offset + length ) > ( IDENT_9 . length ) ) ) || ( length < 0 ) ) { int len = offset + length ; throw new java . lang . METHOD_10 ( java . lang . String . format ( org . kaazing . IDENT_0 . ws . internal . io . IDENT_14 . IDENT_15 , offset , len , IDENT_9 . length ) ) ; } if ( IDENT_16 . METHOD_11 ( ) ) { try { if ( ( IDENT_17 ) < ( IDENT_18 ) ) { return METHOD_12 ( IDENT_9 , offset , length ) ; } if ( ( IDENT_17 ) == ( IDENT_18 ) ) { IDENT_17 = 0 ; IDENT_18 = 0 ; } if ( ( IDENT_19 ) > ( IDENT_20 ) ) { int IDENT_21 = ( IDENT_19 ) - ( IDENT_20 ) ; java . lang . System . METHOD_13 ( IDENT_22 , IDENT_20 , IDENT_22 , 0 , IDENT_21 ) ; IDENT_20 = 0 ; IDENT_19 = IDENT_21 ; } while ( true ) { if ( ( IDENT_20 ) == ( IDENT_19 ) ) { IDENT_20 = 0 ; IDENT_19 = 0 ; int IDENT_23 = ( IDENT_22 . length ) - ( IDENT_19 ) ; int IDENT_24 = 0 ; try { IDENT_24 = in . read ( IDENT_22 , IDENT_19 , IDENT_23 ) ; if ( IDENT_24 == ( - 1 ) ) { return - 1 ; } } catch ( java . net . IDENT_25 ex ) { return - 1 ; } IDENT_20 = 0 ; IDENT_19 = IDENT_24 ; } int IDENT_26 = METHOD_14 ( ) ; if ( IDENT_26 == ( - 1 ) ) { return - 1 ; } IDENT_27 . METHOD_15 ( IDENT_28 , IDENT_20 ) ; int IDENT_29 = IDENT_27 . METHOD_16 ( ) ; if ( ( ( IDENT_27 . offset ( ) ) + METHOD_16 ) > ( IDENT_19 ) ) { if ( METHOD_16 > ( IDENT_22 . length ) ) { int IDENT_30 = connection . METHOD_17 ( ) ; throw new java . io . IOException ( java . lang . String . format ( org . kaazing . IDENT_0 . ws . internal . io . IDENT_14 . IDENT_31 , METHOD_16 , IDENT_30 ) ) ; } else { if ( ( ( IDENT_27 . offset ( ) ) + METHOD_16 ) > ( IDENT_22 . length ) ) { int len = ( IDENT_19 ) - ( IDENT_20 ) ; java . lang . System . METHOD_13 ( IDENT_22 , IDENT_20 , IDENT_22 , 0 , len ) ; IDENT_20 = 0 ; IDENT_19 = len ; } } int IDENT_32 = connection . METHOD_18 ( false , METHOD_16 ) ; int IDENT_33 = ( ( IDENT_20 ) + IDENT_32 ) - ( IDENT_19 ) ; while ( IDENT_33 > 0 ) { int IDENT_24 = in . read ( IDENT_22 , IDENT_19 , IDENT_33 ) ; if ( IDENT_24 == ( - 1 ) ) { return - 1 ; } IDENT_33 OP_0 IDENT_24 ; IDENT_19 += IDENT_24 ; } IDENT_27 . METHOD_15 ( IDENT_28 , IDENT_20 ) ; } METHOD_19 ( ) ; org . kaazing . IDENT_0 . ws . internal . IDENT_34 context = connection . METHOD_20 ( ) ; org . kaazing . IDENT_0 . ws . internal . io . IDENT_35 IDENT_36 = ( ( org . kaazing . IDENT_0 . ws . internal . io . IDENT_35 ) ( context . METHOD_21 ( ) ) ) ; IDENT_36 . METHOD_22 ( IDENT_37 , IDENT_27 . METHOD_23 ( ) ) ; connection . METHOD_24 ( IDENT_38 . METHOD_15 ( IDENT_39 , IDENT_20 ) ) ; IDENT_20 += IDENT_27 . length ( ) ; if ( ! ( METHOD_25 ( ) ) ) { break ; } } assert ( IDENT_17 ) < ( IDENT_18 ) ; return METHOD_12 ( IDENT_9 , offset , length ) ; } finally { IDENT_16 . METHOD_26 ( ) ; } } return 0 ; }
org . junit . Assert . assertEquals ( IDENT_11 , IDENT_12 )