| Home >> All >> com >> memoire >> [ dja Javadoc ] |
Source code: com/memoire/dja/DjaLoadSaveDja.java
1 /** 2 * @modification $Date: 2001/12/03 16:28:08 $ 3 * @statut unstable 4 * @file DjaLoadSaveDja.java 5 * @version 0.36 6 * @author Guillaume Desnoix 7 * @email guillaume@desnoix.com 8 * @license GNU General Public License 2 (GPL2) 9 * @copyright 1998-2001 Guillaume Desnoix 10 */ 11 12 package com.memoire.dja; 13 14 import com.memoire.fu.*; 15 import com.memoire.dnd.*; 16 import com.memoire.bu.*; 17 import com.memoire.dja.*; 18 import com.memoire.mst.*; 19 20 21 import java.awt.*; 22 import java.io.*; 23 import java.util.*; 24 25 public class DjaLoadSaveDja 26 implements DjaLoadSaveInterface 27 { 28 public boolean canLoad() { return true; } 29 public boolean canSave() { return true; } 30 31 public DjaVector load(File _file) 32 throws Exception 33 { 34 return DjaLoader.loadAsText 35 (new BufferedInputStream(new FileInputStream(_file))); 36 } 37 38 public void save(File _file, DjaVector _vector) 39 throws Exception 40 { 41 DjaSaver.saveAsText 42 (_vector,new BufferedOutputStream(new FileOutputStream(_file))); 43 } 44 45 public BuFileFilter getFilter() 46 { 47 return new BuFileFilter 48 (new String[] { "dja","DJA" }, 49 "Dja files"); 50 } 51 }