public static void main(String[] args) throws Exception {
        Command command = processArgs(args, "OpusComment");
        
        OpusFile op = new OpusFile(new File(command.inFile));
        
        if (command.command == Commands.List) {
            listTags(op.getTags());
        } else {
            // Have the new tags added
            addTags(op.getTags(), command);
            
            // Write out
            List<OpusAudioData> audio = new ArrayList<OpusAudioData>();
            OpusAudioData ad;
            while( (ad = op.getNextAudioPacket()) != null ) {
                audio.add(ad);
            }

            // Now write out
            op.close();
            OpusFile out = new OpusFile(
                    new FileOutputStream(command.outFile),
                    op.getSid(),
                    op.getInfo(),
                    op.getTags()
            );
            for(OpusAudioData oad : audio) {
                out.writeAudioData(oad);
            }
            out.close();
        }
    }