添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
public static void main (String[] args) { try { FileInputStream in = new FileInputStream ( "example.dat" ); int c; while ((c = in.read()) != - 1 ) { System.out.print(( char )c); in.close(); } catch (Exception e) { System.out.println( "Error reading file" );

上面的代码使用了 FileInputStream 类来读取 .dat 文件,并通过循环读取文件中的数据,最后打印出来。

  • 以太坊开发
  •