|  |  | 
 |  |  | import com.easysocket.interfaces.io.IReader; | 
 |  |  | import com.easysocket.utils.HexUtil; | 
 |  |  | import com.easysocket.utils.LogUtil; | 
 |  |  | import com.tencent.bugly.crashreport.CrashReport; | 
 |  |  |  | 
 |  |  | import java.io.IOException; | 
 |  |  | import java.io.InputStream; | 
 |  |  | 
 |  |  |                 // 停止线程 | 
 |  |  |                 stopThread = true; | 
 |  |  |                 release(); | 
 |  |  |                 LogUtil.i("reader停止线程"); | 
 |  |  |                 CrashReport.postCatchedException(unrecoverableException); | 
 |  |  |             } catch (ReadRecoverableExeption readRecoverableExeption) { | 
 |  |  |                 readRecoverableExeption.printStackTrace(); | 
 |  |  |                 // 重连 | 
 |  |  |                 LogUtil.d("--->重连 ReadRecoverableExeption"); | 
 |  |  |                 connectionManager.disconnect(true); | 
 |  |  |  | 
 |  |  |             } catch (IOException e) { | 
 |  |  |                 e.printStackTrace(); | 
 |  |  |                 // 重连 | 
 |  |  | 
 |  |  |  | 
 |  |  |     // 释放资源 | 
 |  |  |     private void release() { | 
 |  |  |         LogUtil.i("reader线程释放资源"); | 
 |  |  |         if (originBuf != null) { | 
 |  |  |             originBuf = null; | 
 |  |  |         } |