⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pipeinputstreamtooutputstream.java

📁 一个基于J2ME技术的程序,使你可以远程控制装有服务端的PC.
💻 JAVA
字号:
/* * Copyright (C) 2007 Filippo Di Vattimo - See LICENSE * */package fildiv.jremcntl.tools.common;import java.io.IOException;import java.io.InputStream;import java.io.OutputStream;public class PipeInputStreamToOutputStream implements Runnable {  	private final InputStream is;    private final OutputStream os;    public PipeInputStreamToOutputStream(InputStream is, OutputStream os) {        this.is = is;        this.os = os;    }        public void run() {    	        byte[] buffer = new byte[1024];        try {		        for(int count = 0; (count = is.read(buffer)) >= 0;)	        						os.write(buffer, 0, count);		} catch (IOException e) {			throw new JRemToolsRuntimeException(e);		}    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -