- 更新日時:
- 2010/05/11 20:15:55 (2 年 前)
- パス:
- trunk/src/org/rayflood/mikuvat/io/vsq
- ファイル:
-
- 1 追加
- 1 移動
-
. (追加)
-
LyricHandle.java (移動) (移動元: trunk/src/org/rayflood/mikuvat/io/LyricHandle.java) (4 diff)
凡例:
- 変更なし
- 追加
- 削除
-
trunk/src/org/rayflood/mikuvat/io/vsq/LyricHandle.java
r2 r4 1 package org.rayflood.mikuvat.io ;1 package org.rayflood.mikuvat.io.vsq; 2 2 3 import static org.rayflood.mikuvat. io.VSQDecoder.splitEqual;3 import static org.rayflood.mikuvat.Utilities.splitEqual; 4 4 5 5 import java.io.File; 6 import java.io.FileNotFoundException; 7 import java.io.IOException; 6 8 import java.util.ArrayList; 7 9 import java.util.List; 8 10 9 public class LyricHandle extends ImmutableObject{ 11 import org.rayflood.mikuvat.io.BaseObject; 12 import org.rayflood.mikuvat.io.InvalidBaseObjectException; 13 14 public class LyricHandle extends BaseObject{ 10 15 private static final long serialVersionUID = 3044157326865723314L; 11 16 private ArrayList<LyricNote> lyricNotes; … … 47 52 } 48 53 49 StringBu ffer sb = new StringBuffer();54 StringBuilder sb = new StringBuilder(); 50 55 sb.append("LyricHandle={"); 51 56 if(!sl.isEmpty()){ … … 59 64 } 60 65 61 public boolean isReadied(){66 public boolean validate() throws InvalidBaseObjectException{ 62 67 boolean ready = true; 63 ready &= hasLyricNotes() && getLyricNote().isReadied(); 68 ready &= hasLyricNotes() && getLyricNote().validate(); 69 if(!ready){ 70 throw new InvalidBaseObjectException(this); 71 } 64 72 return ready; 65 73 } 66 74 67 public int compareTo( ImmutableObject obj){75 public int compareTo(BaseObject obj){ 68 76 LyricHandle lyricHandle = (LyricHandle)obj; 69 77 return compare(getLyricNote(), lyricHandle.getLyricNote()); 70 78 } 71 79 72 public LyricHandle over( Object obj, boolean fill, boolean has){80 public LyricHandle over(BaseObject obj, boolean fill, boolean has){ 73 81 LyricHandle lyricHandle = ((LyricHandle)obj).clone(); 74 82 if(lyricHandle.hasLyricNotes()){ … … 150 158 } 151 159 152 public static LyricHandle load(String file) throws Exception{153 return (LyricHandle) ImmutableObject.load(file);160 public static LyricHandle load(String file) throws FileNotFoundException, IOException, ClassNotFoundException{ 161 return (LyricHandle)BaseObject.load(file); 154 162 } 155 163 156 public static LyricHandle load(File file) throws Exception{157 return (LyricHandle) ImmutableObject.load(file);164 public static LyricHandle load(File file) throws FileNotFoundException, IOException, ClassNotFoundException{ 165 return (LyricHandle)BaseObject.load(file); 158 166 } 159 167 160 public void store(String file) throws Exception{168 public void store(String file) throws FileNotFoundException, IOException{ 161 169 super.store(file); 162 170 } 163 171 164 public void store(File file) throws Exception{172 public void store(File file) throws FileNotFoundException, IOException{ 165 173 super.store(file); 166 174 } 167 175 168 public static LyricHandle unzip(String file) throws Exception{169 return (LyricHandle) ImmutableObject.unzip(file);176 public static LyricHandle unzip(String file) throws IOException, ClassNotFoundException{ 177 return (LyricHandle)BaseObject.unzip(file); 170 178 } 171 179 172 public static LyricHandle unzip(File file) throws Exception{173 return (LyricHandle) ImmutableObject.unzip(file);180 public static LyricHandle unzip(File file) throws IOException, ClassNotFoundException{ 181 return (LyricHandle)BaseObject.unzip(file); 174 182 } 175 183 176 public void zip(String file) throws Exception{184 public void zip(String file) throws IOException{ 177 185 super.zip(file); 178 186 } 179 187 180 public void zip(File file) throws Exception{188 public void zip(File file) throws IOException{ 181 189 super.zip(file); 182 190 }
