view src/treeVnc/SendThread.java @ 0:756bfaf731f3

create new repository
author Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
date Tue, 21 Feb 2012 04:10:12 +0900
parents
children
line wrap: on
line source

package treeVnc;
import java.net.Socket;
import java.io.IOException;
import java.io.OutputStream;


public class SendThread implements Runnable {

	Socket sock;
	OutputStream out;
	byte b[];

	SendThread(Socket _sock, byte _b[]){
		sock = _sock;
		b = _b;
	}
	SendThread(OutputStream _out, byte _b[]){
		out = _out;
		b = _b;
	}
	
	public void run() {
		try{
			out.write(b, 0, b.length);	
//			sock.getOutputStream().write(b, 0, b.length);
		}catch(IOException e){
			
		}
	}
}