Code example for FileInputStream

Methods: read

0
        if (gif.canRead())
        { 
            FileInputStream in = null;
            try{ 
                byte [] buf = new byte[10];
                in = new FileInputStream(gif);
                if (in.read(buf,0,10)==10)
                { 
                    if(Log.isDebugEnabled())Log.debug("Image "+gif.getName()+
                               " is " + 
                               ((0x00ff&buf[7])*256+(0x00ff&buf[6])) +
                               " x " + 
                               (((0x00ff&buf[9])*256+(0x00ff&buf[8]))));
                    width((0x00ff&buf[7])*256+(0x00ff&buf[6]));
                    height(((0x00ff&buf[9])*256+(0x00ff&buf[8])));
                } 
            } 
            catch (IOException e){
                Log.ignore(e);
            } 
            finally {