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

📄 j_datainputstream.java

📁 一个十分好的java基础学习的课件
💻 JAVA
字号:
// ////////////////////////////////////////////////////////
// 
// J_DataInputStream.java
// 

// ////////////////////////////////////////////////////////

import java.io.*; 

public class J_DataInputStream
{

    public static void main(String args[])
    {
        byte b;

        try
        {
            FileInputStream t= new FileInputStream("out.txt");
            DataInputStream f =new DataInputStream(t);
            while (true)
            {
                try
                {
                    b= f.readByte( );
                    b-=(byte)'0';
                    System.out.print(b);
                }
                catch(EOFException ex)
                {
                    System.out.println( );
                    break;
                } // End of try/catch structure.
            } // End of loop: while
            f.close( );
        } 
        catch(Exception e)
        {
            System.out.println(e);
        } // End of try/catch structure.
    } // End of method: main

} // End of class: J_DataInputStream

⌨️ 快捷键说明

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