/** * Reads a byte from the data source. * * -1 means end. * @return * @throws IOException */ protected int read() throws IOException { return readable.readByte(); }
/** * Reads a byte from the data source. * * -1 means end. * @return * @throws IOException */ protected int read() throws IOException { return readable.readByte(); }
/** * Reads a byte from the data source. * * -1 means end. * @return * @throws IOException */ protected int read() throws IOException { return readable.readByte(); }
@Override public int read() throws IOException { return source.readByte(); }
@Override public int read() throws IOException { return source.readByte(); }
@Override public int read() throws IOException { return source.readByte(); }
/** * -1 means end. * @return * @throws IOException */ protected int read() throws IOException { int b = readable.readByte(); // [NOCPP[ switch (b) { case '\n': if (!prevWasCR) { line++; col = 0; } prevWasCR = false; break; case '\r': line++; col = 0; prevWasCR = true; break; default: col++; prevWasCR = false; break; } // ]NOCPP] return b; }
/** * -1 means end. * @return * @throws IOException */ protected int read() throws IOException { int b = readable.readByte(); // [NOCPP[ switch (b) { case '\n': if (!prevWasCR) { line++; col = 0; } prevWasCR = false; break; case '\r': line++; col = 0; prevWasCR = true; break; default: col++; prevWasCR = false; break; } // ]NOCPP] return b; }
/** * -1 means end. * @return * @throws IOException */ protected int read() throws IOException { int b = readable.readByte(); // [NOCPP[ switch (b) { case '\n': if (!prevWasCR) { line++; col = 0; } prevWasCR = false; break; case '\r': line++; col = 0; prevWasCR = true; break; default: col++; prevWasCR = false; break; } // ]NOCPP] return b; }
Encoding sniff() throws IOException { int b = source.readByte(); if (b == 0xEF) { // UTF-8 b = source.readByte(); if (b == 0xBB) { b = source.readByte(); if (b == 0xBF) { return Encoding.UTF8; b = source.readByte(); if (b == 0xFE) { return Encoding.UTF16LE; b = source.readByte(); if (b == 0xFF) { return Encoding.UTF16BE;
Encoding sniff() throws IOException { int b = source.readByte(); if (b == 0xEF) { // UTF-8 b = source.readByte(); if (b == 0xBB) { b = source.readByte(); if (b == 0xBF) { return Encoding.UTF8; b = source.readByte(); if (b == 0xFE) { return Encoding.UTF16LE; b = source.readByte(); if (b == 0xFF) { return Encoding.UTF16BE;
Encoding sniff() throws IOException { int b = source.readByte(); if (b == 0xEF) { // UTF-8 b = source.readByte(); if (b == 0xBB) { b = source.readByte(); if (b == 0xBF) { return Encoding.UTF8; b = source.readByte(); if (b == 0xFE) { return Encoding.UTF16LE; b = source.readByte(); if (b == 0xFF) { return Encoding.UTF16BE;