Correção de um código JAVA de 2006
Pessoal estou com um problema aqui, estou precisando de um programa que corrija erro de NON COMPLIANT de arquivos de áudio lossless CUE SHEET para rodar no foobar2000.
Depois de muito procurar no google, encontrei dois códigos na web, mas ao compila-los com o JAVA obtive 13 erros que mostro abaixo, e tem outra coisa, faz muito tempo que não mexo com java, e desaprendi muita coisa, então gostaria de saber o que realmente fazem os dois códigos, porque minha ideia é rodar um programa que leia vários arquivos CUE SHEET de áudio lossless que tenho no meu HD e corrija todos aqueles que tem erro de NON COMPLIANT para serem lidos pelo foobar, e o cara lá no fórum diz que resolve este problema com os dois códigos, mas não diz se ele os corrige, vou dar um exemplo que tenho encontrado aqui comigo, de várias fontes baixadas da web que vem como NON COMPLIANT quando tento lê-los no foobar2000:
REM GENRE Pop
REM DATE 1998
REM DISCID 900B440A
REM COMMENT "ExactAudioCopy v1.0b1"
PERFORMER "Bruce Hornsby"
TITLE "Spirit Trail (Disc 1)"
FILE "01 - King of the Hill.flac" WAVE
TRACK 01 AUDIO
TITLE "King of the Hill"
PERFORMER "Bruce Hornsby"
INDEX 01 00:00:00
FILE "02 - Resting Place.flac" WAVE
TRACK 02 AUDIO
TITLE "Resting Place"
PERFORMER "Bruce Hornsby"
INDEX 01 00:00:00
FILE "03 - Preacher in the Ring Pt. I.flac" WAVE
TRACK 03 AUDIO
TITLE "Preacher in the Ring Pt. I"
PERFORMER "Bruce Hornsby"
INDEX 01 00:00:00
FILE "04 - Preacher in the Ring Pt. II.flac" WAVE
TRACK 04 AUDIO
TITLE "Preacher in the Ring Pt. II"
PERFORMER "Bruce Hornsby"
INDEX 01 00:00:00
TRACK 05 AUDIO
TITLE "Song C"
PERFORMER "Bruce Hornsby"
INDEX 00 04:46:55
FILE "05 - Song C.flac" WAVE
INDEX 01 00:00:00
A parte do CUE que está com erro é justamente a que está em BOLD acima, o correto seria:
FILE "04 - Preacher in the Ring Pt. II.flac" WAVE
TRACK 04 AUDIO
TITLE "Preacher in the Ring Pt. II"
PERFORMER "Bruce Hornsby"
INDEX 01 00:00:00
FILE "05 - Song C.flac" WAVE
TRACK 05 AUDIO
TITLE "Song C"
PERFORMER "Bruce Hornsby"
INDEX 00 04:46:55
INDEX 01 00:00:00
Ou seja a sequência é sempre
FILE "arquivo lossless" WAVE
TRACK ## AUDIO
O que eu queria saber é se estes dois códigos fazem esta correção no arquivo CUE SHEET, para eu poder consertar os mesmos, e como eu devo fazer isso com o código, e como corrigir este código do ano de 2006 que provavelmente tem comando substituidos por mais novos, como corrigilos pois a opção do java apenas aponta os erros.
Grato pela ajuda.
Druid®.
Código pego aqui: https://hydrogenaud.io/index.php/topic,48683.msg434351.html#msg434351 (https://hydrogenaud.io/index.php/topic,48683.0.html)
Tenho instaldo aqui no meu Windows 10 Enterprise o java: Inslatado JDK da Oracle (http://www.oracle.com/technetwork/pt/java/javase/downloads/jdk8-downloads-2133151.html) - Java SE Development Kit 8u151
Erros (Warnings do Java)
E:\\JAVA Programs>javac Cue2Compliant.java -Xlint
Cue2Compliant.java:60: warning: [rawtypes] found raw type: LinkedList
LinkedList clean = new LinkedList ();
^
missing type arguments for generic class LinkedList<E>
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:60: warning: [rawtypes] found raw type: LinkedList
LinkedList clean = new LinkedList ();
^
missing type arguments for generic class LinkedList<E>
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:72: warning: [unchecked] unchecked call to add(E) as a member of the raw type LinkedList
clean.add(line);
^
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:79: warning: [unchecked] unchecked call to add(E) as a member of the raw type LinkedList
clean.add(line);
^
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:90: warning: [unchecked] unchecked call to add(E) as a member of the raw type LinkedList
clean.add(line);
^
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:99: warning: [unchecked] unchecked call to add(E) as a member of the raw type LinkedList
clean.add(line);
^
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:104: warning: [unchecked] unchecked call to add(E) as a member of the raw type LinkedList
clean.add(line);
^
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:106: warning: [rawtypes] found raw type: LinkedList
LinkedList tmp = new LinkedList();
^
missing type arguments for generic class LinkedList<E>
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:106: warning: [rawtypes] found raw type: LinkedList
LinkedList tmp = new LinkedList();
^
missing type arguments for generic class LinkedList<E>
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:114: warning: [unchecked] unchecked call to add(int,E) as a member of the raw type LinkedList
tmp.add(0, moveLine);
^
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:117: warning: [unchecked] unchecked call to add(int,E) as a member of the raw type LinkedList
clean.add(trackLink + i, tmp.get(i));
^
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:119: warning: [unchecked] unchecked call to add(int,E) as a member of the raw type LinkedList
clean.add(trackLink + tmp.size(), line);
^
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:121: warning: [unchecked] unchecked call to add(E) as a member of the raw type LinkedList
clean.add(line);
^
where E is a type-variable:
E extends Object declared in class LinkedList
13 warnings
Depois de muito procurar no google, encontrei dois códigos na web, mas ao compila-los com o JAVA obtive 13 erros que mostro abaixo, e tem outra coisa, faz muito tempo que não mexo com java, e desaprendi muita coisa, então gostaria de saber o que realmente fazem os dois códigos, porque minha ideia é rodar um programa que leia vários arquivos CUE SHEET de áudio lossless que tenho no meu HD e corrija todos aqueles que tem erro de NON COMPLIANT para serem lidos pelo foobar, e o cara lá no fórum diz que resolve este problema com os dois códigos, mas não diz se ele os corrige, vou dar um exemplo que tenho encontrado aqui comigo, de várias fontes baixadas da web que vem como NON COMPLIANT quando tento lê-los no foobar2000:
REM GENRE Pop
REM DATE 1998
REM DISCID 900B440A
REM COMMENT "ExactAudioCopy v1.0b1"
PERFORMER "Bruce Hornsby"
TITLE "Spirit Trail (Disc 1)"
FILE "01 - King of the Hill.flac" WAVE
TRACK 01 AUDIO
TITLE "King of the Hill"
PERFORMER "Bruce Hornsby"
INDEX 01 00:00:00
FILE "02 - Resting Place.flac" WAVE
TRACK 02 AUDIO
TITLE "Resting Place"
PERFORMER "Bruce Hornsby"
INDEX 01 00:00:00
FILE "03 - Preacher in the Ring Pt. I.flac" WAVE
TRACK 03 AUDIO
TITLE "Preacher in the Ring Pt. I"
PERFORMER "Bruce Hornsby"
INDEX 01 00:00:00
FILE "04 - Preacher in the Ring Pt. II.flac" WAVE
TRACK 04 AUDIO
TITLE "Preacher in the Ring Pt. II"
PERFORMER "Bruce Hornsby"
INDEX 01 00:00:00
TRACK 05 AUDIO
TITLE "Song C"
PERFORMER "Bruce Hornsby"
INDEX 00 04:46:55
FILE "05 - Song C.flac" WAVE
INDEX 01 00:00:00
A parte do CUE que está com erro é justamente a que está em BOLD acima, o correto seria:
FILE "04 - Preacher in the Ring Pt. II.flac" WAVE
TRACK 04 AUDIO
TITLE "Preacher in the Ring Pt. II"
PERFORMER "Bruce Hornsby"
INDEX 01 00:00:00
FILE "05 - Song C.flac" WAVE
TRACK 05 AUDIO
TITLE "Song C"
PERFORMER "Bruce Hornsby"
INDEX 00 04:46:55
INDEX 01 00:00:00
Ou seja a sequência é sempre
FILE "arquivo lossless" WAVE
TRACK ## AUDIO
O que eu queria saber é se estes dois códigos fazem esta correção no arquivo CUE SHEET, para eu poder consertar os mesmos, e como eu devo fazer isso com o código, e como corrigir este código do ano de 2006 que provavelmente tem comando substituidos por mais novos, como corrigilos pois a opção do java apenas aponta os erros.
Grato pela ajuda.
Druid®.
Código pego aqui: https://hydrogenaud.io/index.php/topic,48683.msg434351.html#msg434351 (https://hydrogenaud.io/index.php/topic,48683.0.html)
Tenho instaldo aqui no meu Windows 10 Enterprise o java: Inslatado JDK da Oracle (http://www.oracle.com/technetwork/pt/java/javase/downloads/jdk8-downloads-2133151.html) - Java SE Development Kit 8u151
Erros (Warnings do Java)
E:\\JAVA Programs>javac Cue2Compliant.java -Xlint
Cue2Compliant.java:60: warning: [rawtypes] found raw type: LinkedList
LinkedList clean = new LinkedList ();
^
missing type arguments for generic class LinkedList<E>
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:60: warning: [rawtypes] found raw type: LinkedList
LinkedList clean = new LinkedList ();
^
missing type arguments for generic class LinkedList<E>
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:72: warning: [unchecked] unchecked call to add(E) as a member of the raw type LinkedList
clean.add(line);
^
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:79: warning: [unchecked] unchecked call to add(E) as a member of the raw type LinkedList
clean.add(line);
^
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:90: warning: [unchecked] unchecked call to add(E) as a member of the raw type LinkedList
clean.add(line);
^
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:99: warning: [unchecked] unchecked call to add(E) as a member of the raw type LinkedList
clean.add(line);
^
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:104: warning: [unchecked] unchecked call to add(E) as a member of the raw type LinkedList
clean.add(line);
^
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:106: warning: [rawtypes] found raw type: LinkedList
LinkedList tmp = new LinkedList();
^
missing type arguments for generic class LinkedList<E>
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:106: warning: [rawtypes] found raw type: LinkedList
LinkedList tmp = new LinkedList();
^
missing type arguments for generic class LinkedList<E>
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:114: warning: [unchecked] unchecked call to add(int,E) as a member of the raw type LinkedList
tmp.add(0, moveLine);
^
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:117: warning: [unchecked] unchecked call to add(int,E) as a member of the raw type LinkedList
clean.add(trackLink + i, tmp.get(i));
^
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:119: warning: [unchecked] unchecked call to add(int,E) as a member of the raw type LinkedList
clean.add(trackLink + tmp.size(), line);
^
where E is a type-variable:
E extends Object declared in class LinkedList
Cue2Compliant.java:121: warning: [unchecked] unchecked call to add(E) as a member of the raw type LinkedList
clean.add(line);
^
where E is a type-variable:
E extends Object declared in class LinkedList
13 warnings
José Chaurais
Curtidas 0