差分発生行の前後
無視リスト:
更新日時:
2010/05/11 20:15:55 (2 年 前)
更新者:
h
ログメッセージ:

refs #2 #8 #9 #7 #6
現状のソースをコミット。一部完了。一部未完了。
関連づいてない完了チケットのチェンジセットもまとめて。
パッケージ階層も大幅に変更。

パス:
trunk/src/org/rayflood/mikuvat/io/vsq
ファイル:
1 追加
1 移動

凡例:

変更なし
追加
削除
  • trunk/src/org/rayflood/mikuvat/io/vsq/IconHandle.java

    r2 r4  
    1 package org.rayflood.mikuvat.io; 
    2  
    3 import static org.rayflood.mikuvat.io.VSQDecoder.splitEqual; 
     1package org.rayflood.mikuvat.io.vsq; 
     2 
     3import static org.rayflood.mikuvat.Utilities.splitEqual; 
    44 
    55import java.io.File; 
     6import java.io.FileNotFoundException; 
     7import java.io.IOException; 
    68import java.util.ArrayList; 
    79import java.util.List; 
    810 
    9 public class IconHandle extends ImmutableObject{ 
     11import org.rayflood.mikuvat.io.BaseObject; 
     12import org.rayflood.mikuvat.io.InvalidBaseObjectException; 
     13 
     14public class IconHandle extends BaseObject{ 
    1015        private static final long serialVersionUID = 6787028875195143543L; 
    1116        public static final String ICONID = "IconID"; 
     
    9398                } 
    9499 
    95                 StringBuffer sb = new StringBuffer(); 
     100                StringBuilder sb = new StringBuilder(); 
    96101                sb.append("IconHandle={"); 
    97102                if(!sl.isEmpty()){ 
     
    105110        } 
    106111 
    107         public boolean isReadied(){ 
     112        public boolean validate() throws InvalidBaseObjectException{ 
    108113                boolean ready = true; 
    109114                ready &= hasIconID(); 
     
    114119                ready &= hasLanguage(); 
    115120                ready &= hasProgram(); 
     121                if(!ready){ 
     122                        throw new InvalidBaseObjectException(this); 
     123                } 
    116124                return ready; 
    117125        } 
    118126 
    119         public int compareTo(ImmutableObject obj){ 
     127        public int compareTo(BaseObject obj){ 
    120128                IconHandle iconHandle = (IconHandle)obj; 
    121129                return compare(getIconID(), iconHandle.getIconID()); 
    122130        } 
    123131 
    124         public IconHandle over(Object obj, boolean fill, boolean has){ 
     132        public IconHandle over(BaseObject obj, boolean fill, boolean has){ 
    125133                IconHandle iconHandle = ((IconHandle)obj).clone(); 
    126134                if(iconHandle.hasIconID() && (fill || has == hasIconID())){ 
     
    340348        } 
    341349 
    342         public static IconHandle load(String file) throws Exception{ 
    343                 return (IconHandle)ImmutableObject.load(file); 
    344         } 
    345  
    346         public static IconHandle load(File file) throws Exception{ 
    347                 return (IconHandle)ImmutableObject.load(file); 
    348         } 
    349  
    350         public void store(String file) throws Exception{ 
     350        public static IconHandle load(String file) throws FileNotFoundException, IOException, ClassNotFoundException{ 
     351                return (IconHandle)BaseObject.load(file); 
     352        } 
     353 
     354        public static IconHandle load(File file) throws FileNotFoundException, IOException, ClassNotFoundException{ 
     355                return (IconHandle)BaseObject.load(file); 
     356        } 
     357 
     358        public void store(String file) throws FileNotFoundException, IOException{ 
    351359                super.store(file); 
    352360        } 
    353361 
    354         public void store(File file) throws Exception{ 
     362        public void store(File file) throws FileNotFoundException, IOException{ 
    355363                super.store(file); 
    356364        } 
    357365 
    358         public static IconHandle unzip(String file) throws Exception{ 
    359                 return (IconHandle)ImmutableObject.unzip(file); 
    360         } 
    361  
    362         public static IconHandle unzip(File file) throws Exception{ 
    363                 return (IconHandle)ImmutableObject.unzip(file); 
    364         } 
    365  
    366         public void zip(String file) throws Exception{ 
     366        public static IconHandle unzip(String file) throws IOException, ClassNotFoundException{ 
     367                return (IconHandle)BaseObject.unzip(file); 
     368        } 
     369 
     370        public static IconHandle unzip(File file) throws IOException, ClassNotFoundException{ 
     371                return (IconHandle)BaseObject.unzip(file); 
     372        } 
     373 
     374        public void zip(String file) throws IOException{ 
    367375                super.zip(file); 
    368376        } 
    369377 
    370         public void zip(File file) throws Exception{ 
     378        public void zip(File file) throws IOException{ 
    371379                super.zip(file); 
    372380        }