01: /******************************************************************************
02: * GIF.java
03: * ****************************************************************************/package org.openlaszlo.media;
04:
05: import java.io.InputStream;
06: import java.io.IOException;
07: import java.io.DataInputStream;
08:
09: /**
10: * GIF
11: */
12: public class GIF {
13:
14: static public boolean is(InputStream str) throws IOException {
15:
16: final int magic = 0x47494638; // GIF8
17:
18: DataInputStream ds = new DataInputStream(str);
19: return (ds.readInt() == magic);
20: }
21: }
|