testcasesupport.java

来自「webwork source」· Java 代码 · 共 42 行

JAVA
42
字号
/* * WebWork, Web Application Framework * * Distributable under Apache license. * See terms of license at opensource.org */package webwork;import java.io.InputStream;import java.io.OutputStream;import java.io.IOException;import junit.framework.TestCase;/** * @author Maurice C. Parker (maurice@vineyardenterprise.com) */public class TestCaseSupport extends TestCase {  public TestCaseSupport() {    super();  }	public TestCaseSupport(String testName) {		super(testName);	}	protected void fail(Exception e) {		e.printStackTrace();		fail(e.getMessage());	}  public void pipe(InputStream in, OutputStream out) throws IOException  {    byte[] buffer =  new byte[1024];    int lengthRead;    while((lengthRead = in.read(buffer)) >= 0)      out.write(buffer, 0, lengthRead);  }}

⌨️ 快捷键说明

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