Wozu gibt es die API-Doku? :roll:Loki hat gesagt.:Ich will Daten aus einer ASCII Datei auslesen. Nun hatte ich das mit .readChar() gemacht. Kommt nur MIst raus. Wenn ich aber mit
auslese ,funktioniert das. Meine Frage, wo liegt denn der Unterschied? :bahnhof:Code:(char) .readByte();
readChar
public final char readChar()
throws IOException
Reads a Unicode character from this file. This method reads two bytes from the file, starting at the current file pointer. If the bytes read, in order, are b1 and b2, where 0 <= b1, b2 <= 255, then the result is equal to:
(char)((b1 << 8) | b2)
readByte
public final byte readByte()
throws IOException
Reads a signed eight-bit value from this file. This method reads a byte from the file, starting from the current file pointer. If the byte read is b, where 0 <= b <= 255, then the result is:
(byte)(b)