Das Prog soll einfach eine Bin-Datei "hex-cd" in eine neue "hex-out" kopieren -
(nur um die Funktion der Sprungmarke hinzubekommen, und gerade da hängt's):
Die Fehlermeldung des Compiler ist:
Hab schon so einiges versucht ???:L
Danke im Vorraus
(nur um die Funktion der Sprungmarke hinzubekommen, und gerade da hängt's):
Code:
// Imports
import java.io.*;
class T
{ public static void main ( String[] args ) throws IOException
{
RandomAccessFile inStr = new RandomAccessFile("hex-cd","r"); // wird nur zum lesen geöffnet
File file_02 = new File("hex-out"); // für Dateizugriff auf hex-out
file_02.delete(); // Löscht vorsichtshalber eine etwa bestehende Datei "hex-out"
// diese sollte nicht durch ein anderes Program geöffnet sein
RandomAccessFile outStr = new RandomAccessFile("hex-out","rw"); // und legt sie neu an (leer)
File file_01 = new File("hex-cd"); // für Dateizugriff auf hex-cd
// Variablendeklaration:
byte b000 = 0x00;
// Prog. selbst:
int zaehler = 1;
while ( zaehler < 2 ) // absichtliche Endlosschleife
{
b000 = inStr.readByte();
if (b000 < 0xFF) { outStr.writeByte(b000); }
if (b000 == 0xFF) { outStr.writeByte(b000);
continue sprungmarke; }
}
sprungmarke:
// planmäßiges Ende:
outStr.close(); // Datei "hex-out" schließen
inStr.close(); // Datei "hex-cd" schließen
}
}
Code:
java:30: undefined label: sprungmarke
continue sprungmarke; }
^
error
Danke im Vorraus