Code example for FileInputStream

Methods: close

0
            writer = new RIFFWriter(tempfile, "TEST");
            RIFFWriter chunk = writer.writeChunk("TSCH");
            chunk.writeByte(10);
            writer.close();
            writer = null;
            FileInputStream fis = new FileInputStream(tempfile);
            reader = new RIFFReader(fis);
            assertTrue(reader.hasNextChunk());
            RIFFReader readchunk = reader.nextChunk();
            readchunk.readByte();
            readchunk.close();
            assertTrue(!reader.hasNextChunk());
            fis.close();
            reader = null;
 
 
        } 
        finally 
        { 
            if(writer != null)
Experience pair programming with AI  Get Codota for Java