test.java

来自「此代码完成对输入流的装饰模式。可以输出自己想要的形式。」· Java 代码 · 共 29 行

JAVA
29
字号
import java.io.*;
public class Test
{
	public static void main(String []args)throws IOException
	{
		int ch=0;
		System.out.println("Now I will read a file. and change lower case to upper case and upper to lower\n");
		try
		{
			InputStream input=
			new changeCaseInputStream(
				new BufferedInputStream(

					   new FileInputStream("changeCase.txt")

					  				   )
					  				);
			while((ch=input.read())>=0)
			{
				System.out.print((char)(ch));
			}
			input.close();
		}
		catch (IOException ioe)
		{
			ioe.printStackTrace();
		}
	}
}

⌨️ 快捷键说明

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