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

📄 slog_string.java

📁 MPICH是MPI的重要研究,提供了一系列的接口函数,为并行计算的实现提供了编程环境.
💻 JAVA
字号:
import java.io.*;public class SLOG_String implements Serializable{    private String str;    public SLOG_String()    {        str = new String();    }    public SLOG_String( byte [] bytes )    {        str = new String( bytes );    }    public SLOG_String( char [] values )    {        str = new String( values );    }    public int ReadFromRandomFileAt( RandomAccessFile file_stm, long fileloc )    throws IOException    {        file_stm.seek( fileloc );        return( ReadFromRandomFile( file_stm ) );    }    public int ReadFromRandomFile( RandomAccessFile file_stm )    throws IOException    {        int Nchar    = file_stm.readInt();        byte bytes[] = new byte[ Nchar ];        file_stm.readFully( bytes );        str = new String( bytes );        return Nchar;    }    public int WriteToRandomFile( RandomAccessFile file_stm )    throws IOException    {        int Nchar = str.length();        file_stm.writeInt( Nchar );        file_stm.writeBytes( str );        return Nchar;    }    public String toString()    {        return str;    }}

⌨️ 快捷键说明

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