slog_irec_vtrargs.java

来自「MPICH是MPI的重要研究,提供了一系列的接口函数,为并行计算的实现提供了编程」· Java 代码 · 共 73 行

JAVA
73
字号
import java.io.*;import java.util.*;public class SLOG_Irec_vtrargs extends Vector{    public SLOG_Irec_vtrargs()    {        super();    }    public SLOG_Irec_vtrargs( int in_Nvtr )    {        super( in_Nvtr );    }    public SLOG_Irec_vtrargs(       DataInputStream data_istm,                              final SLOG_RecDefs    recdefs,                              final SLOG_Irec_min   irec_min,                                    int             in_Nbytes_read )    throws IOException, IllegalArgumentException    {        super();        this.ReadFromDataStream( data_istm, recdefs,                                 irec_min, in_Nbytes_read );    }    public void ReadFromDataStream(       DataInputStream  data_istm,                                    final SLOG_RecDefs     recdefs,                                    final SLOG_Irec_min    irec_min,                                          int              in_Nbytes_read )    throws IOException, IllegalArgumentException    {        int count;        int Nbytes_read = in_Nbytes_read;        int Nargs;        if ( SLOG_global.IsVarRec( irec_min.rectype ) ) {            if ( Nbytes_read > irec_min.bytesize )                throw new IllegalArgumentException( "in_Nbytes_read ( "                                                  + in_Nbytes_read + " ) > "                                                  + "irec_min.bytesize ( "                                                  + irec_min.bytesize                                                   + " ) " );            for ( count = 0; Nbytes_read < irec_min.bytesize; count++ ) {                Nargs = data_istm.readShort();                Nbytes_read += 2;                SLOG_Irec_args args  = new SLOG_Irec_args( data_istm, Nargs );                super.addElement( args );                Nbytes_read += args.NbytesInFile();            }        }    //  end of if SLOG_global.IsVarRec( irec_min.rectype ) = true        else {   //  if SLOG_global.IsVarRec( irec_min.rectype ) = false             Nargs = recdefs.NumOfArgs( irec_min.intvltype, irec_min.bebits );            SLOG_Irec_args args  = new SLOG_Irec_args( data_istm, Nargs );            super.addElement( args );            Nbytes_read += args.NbytesInFile();        }    //  end of if SLOG_global.IsVarRec( irec_min.rectype ) = false        if ( Nbytes_read != irec_min.bytesize )            throw new IOException( "Inconsistency detected : "                                 + "Nbytes_read ( " + Nbytes_read + " ) != "                                 + "Irec.bytesize ( " + irec_min.bytesize                                 + " ) " );    }     public void WriteToDataStream( DataOutputStream  data_ostm )    throws IOException    {    }}

⌨️ 快捷键说明

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