1 4 5 9 10 package org.openlaszlo.media; 11 12 import java.io.InputStream ; 13 import java.io.IOException ; 14 import java.io.DataInputStream ; 15 16 19 public class GIF { 20 21 static public boolean is(InputStream str) throws IOException { 22 23 final int magic = 0x47494638; 25 DataInputStream ds = new DataInputStream (str); 26 return (ds.readInt() == magic); 27 } 28 } 29 | Popular Tags |