Static Public Member Functions | |
| static void | main (String[] args) |
Definition at line 5 of file Exemple7A.java.
| static void Exemple7A::main | ( | String[] | args | ) | [inline, static] |
Definition at line 7 of file Exemple7A.java.
00008 { 00009 int col=4; 00010 int row=2; 00011 int r,c; 00012 double [] b=new double[row*col]; 00013 00014 SciDoubleArray a = new SciDoubleArray("A",row,col); 00015 Scilab.Exec("A=[1,2,3,4;5 6 7 8];"); 00016 a.Get(); 00017 b=a.getData(); 00018 00019 System.out.println("Exemple 7 A Serialize"); 00020 System.out.println("----------------------------------------------------"); 00021 for(r=0;r<=(a.getRow()*a.getCol())-1;r++) 00022 { 00023 System.out.print(""+b[r]+" "); 00024 } 00025 System.out.println(""); 00026 System.out.println("----------------------------------------------------"); 00027 00028 try 00029 { 00030 FileOutputStream fichier = new FileOutputStream("Exemple7.ser"); 00031 ObjectOutputStream oos = new ObjectOutputStream(fichier); 00032 oos.writeObject(a); 00033 oos.flush(); 00034 oos.close(); 00035 } 00036 00037 catch (java.io.IOException e) 00038 { 00039 e.printStackTrace(); 00040 } 00041 00042 Scilab.Finish(); 00043 00044 }
1.5.1