INCOME TAX (Details 2) - USD ($)
$ in Thousands
12 Months Ended
Jun. 30, 2018
Jun. 30, 2017
Jun. 30, 2016
Income Tax Statutory Tax Rate PRC [Line Items]      
Income before income taxes $ 129,642 $ 83,355 $ 137,742
Withholding tax on dividend paid by subsidiaries 3,019    
Total 22,205 14,386 14,238
People Republic Of China Subsidiaries [Member]      
Income Tax Statutory Tax Rate PRC [Line Items]      
Expected income tax expense at statutory tax rate in the PRC 32,410 20,838 34,436
Effect of different tax rates in various jurisdictions (521) 2,627 2,109
Effect of preferential tax treatment (11,678) (10,650) (12,296)
Effect of non-taxable income (284) 0 (4,985)
Effect of additional deductible research and development expenses (4,260) (2,385) (4,716)
Effect of non-deductible expenses 3,046 4,608 5,569
Effect of change in tax rate (4,801) (4,835) (6,613)
Change in valuation allowance 2,359 3,964 540
Tax rate differential on deferred tax items 0 2,056 (587)
Withholding tax on dividend paid by subsidiaries 4,784 (2,799) 1,252
Others $ 1,150 $ 962 $ (471)