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 PNG { 20 static public boolean is(InputStream str) throws IOException { 21 22 final int magic = 0x89504e47; 24 DataInputStream ds = new DataInputStream (str); 25 return (ds.readInt() == magic); 26 } 27 } 28 | Popular Tags |