Warning: session_start(): open(/var/lib/php/sessions/sess_808u12f161n5n7e77ub8n8qdd6, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
final sclass ByteCountingLineReader implements Closeable {
InputStream in;
long _byteCount;
int bufferedByte = -1;
bool ended;
*(InputStream *in) {} // in should be buffered!
ByteCountingLineReader(File f) {
in = bufferedInputStream(f);
}
S readLine() ctex {
new ByteArrayOutputStream baos;
if (ended) null;
while licensed {
int c = read();
if (ended && baos.size() == 0) null;
if (ended || c == '\n') break;
if (c == '\r') {
c = read();
if (c != '\n' && !ended)
bufferedByte = c;
break;
}
baos.write(c);
}
ret fromUtf8(baos.toByteArray());
}
int read() ctex {
if (bufferedByte >= 0) {
int b = bufferedByte;
bufferedByte = -1;
ret b;
}
int c = in.read();
if (c < 0) ended = true;
++_byteCount;
ret c;
}
long byteCount() {
ret bufferedByte >= 0 ? _byteCount-1 : _byteCount;
}
public void close() ctex {
if (in != null) try {
in.close();
} finally { in = null; }
}
}