public FrameBuffer cut(InputStream is, int fStart, int fEnd) throws Exception{
        
        int cont = 0;
        
        Manager reader = new Manager(is);
        if( fStart > fEnd ){
            //System.err.println("ERROR!! fStart can't be greater than fEnd!!");
            throw new Exception("fStart can't be greater than fEnd!!");
        }
        
        frame_buffer = new FrameBuffer();
        
        FrameData fd ;
        final int option = Constants.HUFFMAN_DOMAIN;
        
        do{

            try{
                fd = reader.decodeFrame(option);
            } catch (Exception e){
                LOGGER.info("End of file");
                break;
            }
            
            // effects
            if (cont < fStart || fEnd < cont){
                reader.storeData(fd, reader.getMainData());
            } else {
                frame_buffer.add_entry(reader.getMainData(), fd);
            }
            
            cont++;
        }
        while(true);
        
        stream = reader.getStream();
        return frame_buffer;
    }