Reputation: 53
Android Studio is telling me that there are some "Unexpected Tokens"..
what are these??
screenshots:
Upvotes: 2
Views: 16523
Reputation: 4252
private InputStream checkForUtf8BOMAndDiscardIfAny(InputStream inputStream) throws IOException {
PushbackInputStream pushbackInputStream = new PushbackInputStream(new
BufferedInputStream(inputStream), 3);
byte[] bom = new byte[3];
if (pushbackInputStream.read(bom) != -1) {
if (!(bom[0] == (byte) 0xEF && bom[1] == (byte) 0xBB && bom[2] == (byte) 0xBF)) {
pushbackInputStream.unread(bom);
}
}
return pushbackInputStream;
}
Upvotes: 0
Reputation: 20356
You have invisible character in these lines, \8232 is line separator. Possibly you copied it somewhere.
Try to paste it in Notepad/TextEdit and copy text from there. Point is to get rid of formatting and extra characters. Or you can just delete these lines and retype them manually.
Upvotes: 5