فهرست منبع

去除无用代码

tianboguang 3 سال پیش
والد
کامیت
bfb40336c4
1فایلهای تغییر یافته به همراه0 افزوده شده و 61 حذف شده
  1. 0 61
      4dkankan-utils-db/src/main/java/com/fdkankan/common/utils/StreamGobbler.java

+ 0 - 61
4dkankan-utils-db/src/main/java/com/fdkankan/common/utils/StreamGobbler.java

@@ -1,61 +0,0 @@
-package com.fdkankan.common.utils;
-
-import java.io.*;
-
-public class StreamGobbler extends Thread {
-
-	InputStream is;  
-    String type;  
-    OutputStream os;  
-
-    public StreamGobbler(InputStream is, String type) {  
-        this(is, type, null);  
-    }  
-
-    StreamGobbler(InputStream is, String type, OutputStream redirect) {  
-        this.is = is;  
-        this.type = type;  
-        this.os = redirect;  
-    }  
-
-    public void run() {  
-        InputStreamReader isr = null;  
-        BufferedReader br = null;  
-        PrintWriter pw = null;  
-        try {  
-            if (os != null)  
-                pw = new PrintWriter(os);  
-
-            isr = new InputStreamReader(is);  
-            br = new BufferedReader(isr);  
-            String line=null;  
-            while ( (line = br.readLine()) != null) {  
-                if (pw != null)  
-                    pw.println(line);  
-                System.out.println(type + ">" + line);      
-            }  
-
-            if (pw != null)  
-                pw.flush();  
-        } catch (IOException ioe) {  
-            ioe.printStackTrace();    
-        } finally{  
-            try {  
-            	if(pw!=null)
-            	{
-            		 pw.close();  
-            	}
-            	if(br!=null)
-            	{
-            		br.close();  
-            	}
-            	if(isr!=null)
-            	{
-            		isr.close();  
-            	}
-            } catch (IOException e) {  
-                e.printStackTrace();  
-            }  
-        }  
-    }  
-}