Code example for FileInputStream

Methods: close, read

0
            throws IOException { 
            this(inClassFile, readWhole(attrFile), outClassFile);
        } 
 
        static byte[] readWhole(File input) throws IOException {
            FileInputStream inStream = new FileInputStream(input);
            int len = (int)input.length();
            byte[] bytes = new byte[len];
            if (inStream.read(bytes, 0, len) != len) {
                throw new IOException("expected size: " + len);
            } 
            inStream.close();
            return bytes;
        } 
 
        void addSDE() throws UnsupportedEncodingException, IOException { 
            int i;
            copy(4 + 2 + 2); // magic min/maj version 
            int constantPoolCountPos = genPos;
            int constantPoolCount = readU2();
            if (log.isDebugEnabled())